[PATCH] Fix librsvg-CRITICAL message



Hi,

Currently when you startup nautilus as a browser in a terminal you get the following message

(nautilus:2340): librsvg-CRITICAL **: rsvg_pixbuf_from_file_at_zoom_with_max: assertion `x_zoom > 0.0 && y_zoom > 0.0' failed

It's caused by a request to load an icon in nautilus-sidebar-title.c with size 0.

This is because sidebar_title->details->best_icon_size is not initialized the first time it is used.

Attached one liner fixes this.

Jaap
Index: nautilus-sidebar-title.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/nautilus-sidebar-title.c,v
retrieving revision 1.152
diff -u -r1.152 nautilus-sidebar-title.c
--- nautilus-sidebar-title.c	15 Jul 2005 13:47:53 -0000	1.152
+++ nautilus-sidebar-title.c	2 Aug 2005 19:19:01 -0000
@@ -77,6 +77,7 @@
 static void		   update_title_font			   (NautilusSidebarTitle      *sidebar_title);
 static void                style_set                               (GtkWidget                 *widget,
 								    GtkStyle                  *previous_style);
+static guint		   get_best_icon_size (NautilusSidebarTitle *sidebar_title);
 
 struct NautilusSidebarTitleDetails {
 	NautilusFile		*file;
@@ -172,6 +173,7 @@
 	gtk_widget_show (sidebar_title->details->notes);
 	gtk_box_pack_start (GTK_BOX (sidebar_title), sidebar_title->details->notes, 0, 0, 0);
 
+	sidebar_title->details->best_icon_size = get_best_icon_size (sidebar_title);
 	/* Keep track of changes in graphics trade offs */
 	update_all (sidebar_title);
 


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