[tracker] Avoid dbus-glib crash on NULL GPtrArray.



commit 8a0d8b14ea3f504481247eb8342c96cb1b042d88
Author: Carlos Garnacho <carlos lanedo com>
Date:   Wed Jan 20 11:27:08 2010 +0100

    Avoid dbus-glib crash on NULL GPtrArray.

 src/tracker-store/tracker-resources.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-store/tracker-resources.c b/src/tracker-store/tracker-resources.c
index 6745a1c..e666001 100644
--- a/src/tracker-store/tracker-resources.c
+++ b/src/tracker-store/tracker-resources.c
@@ -306,6 +306,11 @@ tracker_resources_sparql_update_blank (TrackerResources       *self,
 		return;
 	}
 
+	if (!blank_nodes) {
+		/* Create empty GPtrArray for dbus-glib to be happy */
+		blank_nodes = g_ptr_array_new ();
+	}
+
 	tracker_dbus_request_success (request_id, context);
 	dbus_g_method_return (context, blank_nodes);
 



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