[gtkhtml/gnome-2-32] Bug #630360 - Crash when inserting html file in	composer
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtkhtml/gnome-2-32] Bug #630360 - Crash when inserting html file in	composer
- Date: Wed, 29 Sep 2010 09:07:33 +0000 (UTC)
commit a7a25b48fcd267a30df2958461fd10339c9a4f1d
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 29 11:07:08 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]