From 141d956b5a678fbb0a43938e8909c7c66646a840 Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Thu, 9 Jun 2005 21:36:31 +0000 Subject: Fix a crash when reparenting. Closes bug #169326. Patch from Michele 2005-06-09 Kjartan Maraas * src/vte.c: (vte_terminal_style_changed): Fix a crash when reparenting. Closes bug #169326. Patch from Michele Baldessari. --- ChangeLog | 6 ++++++ src/vte.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 73271f88..487b1f69 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-06-09 Kjartan Maraas + + * src/vte.c: (vte_terminal_style_changed): + Fix a crash when reparenting. Closes bug #169326. + Patch from Michele Baldessari. + 2005-06-05 Ignacio Casal Quinteiro * configure.in: Added 'gl' to ALL_LINGUAS. diff --git a/src/vte.c b/src/vte.c index b5910435..a7465963 100644 --- a/src/vte.c +++ b/src/vte.c @@ -8315,7 +8315,17 @@ vte_terminal_style_changed(GtkWidget *widget, GtkStyle *style, gpointer data) { VteTerminal *terminal; g_return_if_fail(VTE_IS_TERMINAL(widget)); + if (!GTK_WIDGET_REALIZED(widget)) { +#ifdef VTE_DEBUG + if (_vte_debug_on(VTE_DEBUG_MISC)) { + fprintf(stderr, "Don't change style if we aren't realized.\n"); + } +#endif + return; + } + terminal = VTE_TERMINAL(widget); + /* If the font we're using is the same as the old default, then we * need to pick up the new default. */ if (pango_font_description_equal(style->font_desc, -- cgit v1.2.1