[gtkhtml] Bug #630360 - Crash when inserting html file in composer



commit 027debf5ffb836841a68ab4d20e17d41bedc0be2
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 29 11:06:41 2010 +0200

    Bug #630360 - Crash when inserting html file in composer

 components/editor/gtkhtml-editor-actions.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/components/editor/gtkhtml-editor-actions.c b/components/editor/gtkhtml-editor-actions.c
index 3e4b601..bd216c6 100644
--- a/components/editor/gtkhtml-editor-actions.c
+++ b/components/editor/gtkhtml-editor-actions.c
@@ -173,16 +173,15 @@ insert_html_file_ready_cb (GFile *file,
 
 	stream = gtk_html_begin (new_html);
 	gtk_html_write (html, stream, contents, length);
+	/* 'stream' is destroyed inside gtk_html_end */
 	gtk_html_end (html, stream, GTK_HTML_STREAM_OK);
-	gtk_html_stream_destroy (stream);
 
 	g_free (contents);
 
 	html = gtkhtml_editor_get_html (editor);
+	/* 'new_html' destroys gtk_html_insert_gtk_html itself */
 	gtk_html_insert_gtk_html (html, new_html);
 
-	g_object_unref (new_html);
-
 	goto exit;
 
 fail:



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