From c2266fe6e875f30b409b97755aeca512fc2be690 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 17 Aug 2011 16:12:01 -0500 Subject: Debugging info and a protection --- src/users-service-dbus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c index f87d381..ec52771 100644 --- a/src/users-service-dbus.c +++ b/src/users-service-dbus.c @@ -325,6 +325,11 @@ get_cksessions_cb (DBusGProxy *proxy, GPtrArray * sessions, GError * error, gpoi return; } + /* If there's no error we should at least get an + array of zero entries */ + g_return_if_fail(sessions != NULL); + g_debug("Got %d initial sessions", sessions->len); + int i; for (i = 0; i < sessions->len; i++) { seat_proxy_session_added(proxy, g_ptr_array_index(sessions, i), USERS_SERVICE_DBUS(userdata)); -- cgit v1.2.3