[grilo] test-ui: Do not unref NULL icon



commit ef3286e57efeb36801da2097fe6d75526a794561
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Tue Feb 1 08:49:33 2011 +0000

    test-ui: Do not unref NULL icon
    
    Check icon before unreffing it.
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 tools/grilo-test-ui/main.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index 2947e13..288a934 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -588,7 +588,9 @@ browse_search_query_cb (GrlMediaSource *source,
 			-1);
 
     g_object_unref (media);
-    gdk_pixbuf_unref (icon);
+    if (icon) {
+      gdk_pixbuf_unref (icon);
+    }
   }
 
   if (remaining == 0) {



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