[gnumeric] Leak.



commit 5dd03bc28df1e0fefaea12b8656383fc54e31cb6
Author: Morten Welinder <terra gnome org>
Date:   Mon May 16 09:33:14 2011 -0400

    Leak.

 ChangeLog            |    4 ++++
 src/io-context-gtk.c |   14 +++++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7b9b0dd..f08015c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-13  Morten Welinder  <terra gnome org>
+
+	* src/io-context-gtk.c (icg_show_gui): Plug leak.
+
 2011-05-13  Jean Brefort  <jean brefort normalesup org>
 
 	* src/graph.c (gnm_go_data_get_expr): fixed critical. [#649901]
diff --git a/src/io-context-gtk.c b/src/io-context-gtk.c
index 18531d7..206c3e3 100644
--- a/src/io-context-gtk.c
+++ b/src/io-context-gtk.c
@@ -127,7 +127,7 @@ icg_show_gui (IOContextGtk *icg)
 	GtkBox *box;
 	GtkWidget *frame;
 
-	if (init_splash && icg->show_splash){
+	if (init_splash && icg->show_splash) {
 		GdkPixbuf *pixbuf = gdk_pixbuf_new_from_inline
 			(-1, gnumeric_splash, FALSE, NULL);
 		gtk_icon_theme_add_builtin_icon ("GnmSplash",
@@ -137,10 +137,14 @@ icg_show_gui (IOContextGtk *icg)
 	}
 
 	box = GTK_BOX (gtk_vbox_new (FALSE, 0));
-	gtk_box_pack_start (box, gtk_image_new_from_pixbuf (
-		gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
-					  "GnmSplash", 360, 220, NULL)),
-			    TRUE, FALSE, 0);
+	if (icg->show_splash) {
+		GdkPixbuf *pixbuf =
+			gtk_icon_theme_load_icon (gtk_icon_theme_get_default (),
+						  "GnmSplash", 360, 220, NULL);
+		gtk_box_pack_start (box, gtk_image_new_from_pixbuf (pixbuf),
+				    TRUE, FALSE, 0);
+		g_object_unref (pixbuf);
+	}
 
 	/* Don't show this unless we need it. */
 	if (icg->files_total > 1) {



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