[rygel-gst-0-10-plugins] Fix critical showing up when trying to "play" a container.



commit 2bba2da6c86533cb80efb317195a2d1fc3184a8b
Author: Krzesimir Nowak <krnowak openismus com>
Date:   Fri Feb 8 13:19:41 2013 +0100

    Fix critical showing up when trying to "play" a container.

 src/media-export/rygel-media-export-db-container.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/src/media-export/rygel-media-export-db-container.c b/src/media-export/rygel-media-export-db-container.c
index b99a2ce..b0a7167 100644
--- a/src/media-export/rygel-media-export-db-container.c
+++ b/src/media-export/rygel-media-export-db-container.c
@@ -328,9 +328,11 @@ rygel_media_export_db_container_real_find_object (RygelMediaContainer *base,
                                         callback,
                                         user_data,
                                         rygel_media_export_db_container_real_find_object);
-    g_simple_async_result_set_op_res_gpointer (simple,
-                                               object,
-                                               g_object_unref);
+    if (object) {
+      g_simple_async_result_set_op_res_gpointer (simple,
+                                                 object,
+                                                 g_object_unref);
+    }
   }
   g_simple_async_result_complete_in_idle (simple);
   g_object_unref (simple);
@@ -347,13 +349,13 @@ rygel_media_export_db_container_real_find_object_finish (RygelMediaContainer  *b
   if (g_simple_async_result_propagate_error (simple, error)) {
     return NULL;
   }
-  result = RYGEL_MEDIA_OBJECT (g_simple_async_result_get_op_res_gpointer (simple));
+  result = g_simple_async_result_get_op_res_gpointer (simple);
 
   if (result) {
     g_object_ref (result);
   }
 
-  return result;
+  return RYGEL_MEDIA_OBJECT (result);
 }
 
 static GeeArrayList *


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