diff options
author | Ted Gould <ted@gould.cx> | 2011-08-17 16:12:01 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-08-17 16:12:01 -0500 |
commit | c2266fe6e875f30b409b97755aeca512fc2be690 (patch) | |
tree | 46a832d5192c3cac7e677d91b2fbb2d656f4ccc2 | |
parent | 381110b4d8fac1a5d557711c348bb3324624c9ae (diff) | |
download | ayatana-indicator-session-c2266fe6e875f30b409b97755aeca512fc2be690.tar.gz ayatana-indicator-session-c2266fe6e875f30b409b97755aeca512fc2be690.tar.bz2 ayatana-indicator-session-c2266fe6e875f30b409b97755aeca512fc2be690.zip |
Debugging info and a protection
-rw-r--r-- | src/users-service-dbus.c | 5 |
1 files changed, 5 insertions, 0 deletions
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)); |