From 9da9edc5c66534d80ab211bad95f8c97b72c180c Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Mon, 5 Sep 2011 12:25:24 +0100 Subject: protect against a null pointer in the user-dbus-manager --- src/users-service-dbus.c | 8 +++++--- 1 file 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; } -- cgit v1.2.3