[gedit/gnome-2-30] Don't ref the icon if its NULL



commit af01e4b18577d2e16cf0b26479a2cc8408fb3d74
Author: Garrett Regier <alias301 gmail com>
Date:   Wed Jun 16 04:14:03 2010 -0700

    Don't ref the icon if its NULL

 plugins/filebrowser/gedit-file-browser-widget.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index b1fd808..491a9e6 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -531,7 +531,12 @@ get_from_bookmark_file (GeditFileBrowserWidget * obj, GFile * file,
 	item = (NameIcon *)data;
 
 	*name = g_strdup (item->name);
-	*icon = g_object_ref (item->icon);
+	*icon = item->icon;
+
+	if (item->icon != NULL)
+	{
+		g_object_ref (item->icon);
+	}
 
 	return TRUE;
 }



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