[gedit] Make sure to check icon exists before unreffing it
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Make sure to check icon exists before unreffing it
- Date: Tue, 5 Oct 2010 17:07:41 +0000 (UTC)
commit 17b9e50b4bdab38992a647fdd773705fdb2f72b8
Author: Jesse van den Kieboom <jesse icecrew nl>
Date: Tue Oct 5 19:07:33 2010 +0200
Make sure to check icon exists before unreffing it
plugins/filebrowser/gedit-file-browser-widget.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/filebrowser/gedit-file-browser-widget.c b/plugins/filebrowser/gedit-file-browser-widget.c
index 9fe9692..f6dda90 100644
--- a/plugins/filebrowser/gedit-file-browser-widget.c
+++ b/plugins/filebrowser/gedit-file-browser-widget.c
@@ -742,7 +742,11 @@ fill_combo_model (GeditFileBrowserWidget *obj)
COLUMN_ICON, icon,
COLUMN_NAME, _("Bookmarks"),
COLUMN_ID, BOOKMARKS_ID, -1);
- g_object_unref (icon);
+
+ if (icon != NULL)
+ {
+ g_object_unref (icon);
+ }
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (obj->priv->combo),
separator_func, obj, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]