[gtkhtml] Bug #659217 - Crash when disposing GtkHTML when it's still filled



commit e6b49c0f5e13e24ae47ab68df6a776622d6b13dd
Author: Milan Crha <mcrha redhat com>
Date:   Fri Sep 16 12:08:24 2011 +0200

    Bug #659217 - Crash when disposing GtkHTML when it's still filled

 gtkhtml/htmlengine.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtkhtml/htmlengine.c b/gtkhtml/htmlengine.c
index c23c0f1..99406c3 100644
--- a/gtkhtml/htmlengine.c
+++ b/gtkhtml/htmlengine.c
@@ -4890,7 +4890,7 @@ html_engine_begin (HTMLEngine *e,
 					  html_engine_stream_types,
 					  html_engine_stream_write,
 					  html_engine_stream_end,
-					  e);
+					  g_object_ref (e));
 #ifdef LOG_INPUT
 	if (getenv("GTK_HTML_LOG_INPUT_STREAM") != NULL)
 		new_stream = gtk_html_stream_log_new (GTK_HTML (e->widget), new_stream);
@@ -5247,6 +5247,8 @@ html_engine_stream_end (GtkHTMLStream *stream,
 	gtk_widget_queue_resize (GTK_WIDGET (e->widget));
 
 	g_signal_emit (e, signals[LOAD_DONE], 0);
+
+	g_object_unref (e);
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]