summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2005-06-09 21:36:31 +0000
committerKjartan Maraas <kmaraas@src.gnome.org>2005-06-09 21:36:31 +0000
commit141d956b5a678fbb0a43938e8909c7c66646a840 (patch)
tree0293335fbc6e3a08ca0e1a6e070502efdbfc6b11
parent29a57471b73aa43e163144ebc3592094bc27bc31 (diff)
downloadvte-141d956b5a678fbb0a43938e8909c7c66646a840.tar.gz
Fix a crash when reparenting. Closes bug #169326. Patch from Michele
2005-06-09 Kjartan Maraas <kmaraas@gnome.org> * src/vte.c: (vte_terminal_style_changed): Fix a crash when reparenting. Closes bug #169326. Patch from Michele Baldessari.
-rw-r--r--ChangeLog6
-rw-r--r--src/vte.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 73271f88..487b1f69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-06-09 Kjartan Maraas <kmaraas@gnome.org>
+
+ * 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 <nacho.resa@gmail.com>
* 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,