[gedit] Do not unref tab if it is NULL.



commit a7ce12aa42e62461de65baec030053818e3e33c9
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Mon Jul 5 16:32:08 2010 +0200

    Do not unref tab if it is NULL.

 gedit/gedit-documents-panel.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-documents-panel.c b/gedit/gedit-documents-panel.c
index aaa7ba4..9e56a00 100644
--- a/gedit/gedit-documents-panel.c
+++ b/gedit/gedit-documents-panel.c
@@ -1166,7 +1166,10 @@ pixbuf_data_func (GtkTreeViewColumn   *column,
 
 	gtk_cell_renderer_set_visible (cell, tab != NULL);
 
-	g_object_unref (tab);
+	if (tab != NULL)
+	{
+		g_object_unref (tab);
+	}
 }
 
 static void



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