aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2011-09-05 12:25:24 +0100
committerConor Curran <conor.curran@canonical.com>2011-09-05 12:25:24 +0100
commit9da9edc5c66534d80ab211bad95f8c97b72c180c (patch)
tree8f8167c76fb6fef1f5f0abe2841b7cc237d31a2e /src
parent3f39e981fdbe934faf762de161645edd5eba753f (diff)
downloadayatana-indicator-session-9da9edc5c66534d80ab211bad95f8c97b72c180c.tar.gz
ayatana-indicator-session-9da9edc5c66534d80ab211bad95f8c97b72c180c.tar.bz2
ayatana-indicator-session-9da9edc5c66534d80ab211bad95f8c97b72c180c.zip
protect against a null pointer in the user-dbus-manager
Diffstat (limited to 'src')
-rw-r--r--src/users-service-dbus.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/users-service-dbus.c b/src/users-service-dbus.c
index 4b41f4b..0fa751d 100644
--- a/src/users-service-dbus.c
+++ b/src/users-service-dbus.c
@@ -931,9 +931,11 @@ users_service_dbus_can_activate_session (UsersServiceDbus *self)
G_TYPE_BOOLEAN, &can_activate,
G_TYPE_INVALID))
{
- g_warning ("Failed to determine if seat can activate sessions: %s", error->message);
- g_error_free (error);
-
+ if (error != NULL){
+ g_warning ("Failed to determine if seat can activate sessions: %s",
+ error->message);
+ g_error_free (error);
+ }
return FALSE;
}