Don't ref pixbuf if it is NULL

2009-02-26  Alexander Larsson  <alexl@redhat.com>

	* src/file-manager/fm-directory-view.c (add_submenu):
	Don't ref pixbuf if it is NULL


svn path=/trunk/; revision=15022
This commit is contained in:
Alexander Larsson 2009-02-26 07:35:49 +00:00 committed by Alexander Larsson
parent bab2a2bc74
commit 23474d5f06
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2009-02-26 Alexander Larsson <alexl@redhat.com>
* src/file-manager/fm-directory-view.c (add_submenu):
Don't ref pixbuf if it is NULL
2009-02-25 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c (copy_files):

View file

@ -4212,9 +4212,11 @@ add_submenu (GtkUIManager *ui_manager,
escaped_label,
NULL,
NULL);
g_object_set_data_full (G_OBJECT (action), "menu-icon",
g_object_ref (pixbuf),
g_object_unref);
if (pixbuf != NULL) {
g_object_set_data_full (G_OBJECT (action), "menu-icon",
g_object_ref (pixbuf),
g_object_unref);
}
g_object_set (action, "hide-if-empty", FALSE, NULL);