From d0be428b692ba5f7b21215e75ce79e7d2960af05 Mon Sep 17 00:00:00 2001 From: Eric Koegel Date: Mon, 8 Jun 2015 14:56:44 +0300 Subject: Fix Coverity CID 95915 Dereference after null check --- src/ck-seat.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3