[totem] grilo: Change graceful failure into assertion



commit aa8d526fc5ffd1c897dc90260af5c92bf3ebf4d4
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jan 16 22:10:01 2014 +0100

    grilo: Change graceful failure into assertion
    
    We're never supposed to receive audio or images, bail if we do.

 src/plugins/grilo/totem-grilo.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/grilo/totem-grilo.c b/src/plugins/grilo/totem-grilo.c
index ae34afa..07c6ecf 100644
--- a/src/plugins/grilo/totem-grilo.c
+++ b/src/plugins/grilo/totem-grilo.c
@@ -392,8 +392,8 @@ browse_cb (GrlSource *source,
                /* Filter images */
                if (GRL_IS_MEDIA_IMAGE (media) ||
                    GRL_IS_MEDIA_AUDIO (media)) {
-                       g_object_unref (media);
-                       goto out;
+                       /* This isn't supposed to happen as we filter for videos */
+                       g_assert_not_reached ();
                }
 
                thumbnail = totem_grilo_get_icon (media, &thumbnailing);
@@ -416,7 +416,6 @@ browse_cb (GrlSource *source,
                g_object_unref (media);
        }
 
-out:
        if (remaining == 0) {
                gtk_tree_row_reference_free (bud->ref_parent);
                g_object_unref (bud->totem_grilo);


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