Icon unrefs



If you install Nautilus HEAD with a 2.4 control center, you of course
get broken icons, but you also get a CRITICAL error when the file
model tries to unref a NULL pointer returned from
nautilus-icon-factory. It can return NULL when the caller doesn't want
the default icon.

Soeren

? icon-unref.patch
? libnautilus-extension/Makefile
? libnautilus-extension/Makefile.in
? libnautilus-extension/libnautilus-extension.pc
Index: src/file-manager/fm-list-model.c
===================================================================
RCS file: /cvs/gnome/nautilus/src/file-manager/fm-list-model.c,v
retrieving revision 1.29
diff -u -r1.29 fm-list-model.c
--- src/file-manager/fm-list-model.c	31 Mar 2004 09:24:55 -0000	1.29
+++ src/file-manager/fm-list-model.c	14 Apr 2004 08:05:33 -0000
@@ -262,7 +262,10 @@
 			eel_g_list_free_deep (emblem_icons);
 	
 			g_value_set_object (value, icon);
-			g_object_unref (icon);
+
+			if (icon) { 
+				g_object_unref (icon);
+			}
 		}
 		break;
 	case FM_LIST_MODEL_FILE_NAME_IS_EDITABLE_COLUMN:


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