diff options
author | Eric Koegel <eric.koegel@gmail.com> | 2015-06-08 14:56:44 +0300 |
---|---|---|
committer | Eric Koegel <eric.koegel@gmail.com> | 2015-06-08 14:56:44 +0300 |
commit | d0be428b692ba5f7b21215e75ce79e7d2960af05 (patch) | |
tree | a0e83f0f865ba38ded7cab2dd6f2bbd3d791ce28 | |
parent | 576c91459b4c5243bfc16b7e28f9795b828dfb40 (diff) | |
download | ConsoleKit2-d0be428b692ba5f7b21215e75ce79e7d2960af05.tar.gz |
Fix Coverity CID 95915 Dereference after null check
-rw-r--r-- | src/ck-seat.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ck-seat.c b/src/ck-seat.c index 6251cd8..ead6425 100644 --- a/src/ck-seat.c +++ b/src/ck-seat.c @@ -324,7 +324,11 @@ _seat_activate_session (CkSeat *seat, ck_session_set_active (session, TRUE, NULL); } else { /* Change the error code for CkSeat */ - vt_error->code = CK_SEAT_ERROR_FAILED; + if (vt_error) { + vt_error->code = CK_SEAT_ERROR_FAILED; + } else { + g_set_error (&vt_error, CK_SEAT_ERROR, CK_SEAT_ERROR_FAILED, _("Unable to activate session")); + } } g_signal_handler_disconnect (seat->priv->vt_monitor, adata->handler_id); |