From: Romain Perier Date: Wed, 28 Oct 2009 17:20:04 +0100 Subject: Avoid a SIGSEGV in xsmp_stop() when the SmsConn object is NULL, in this case we must throw an GError (imported from 2.28 dev cycle) When xsmp->priv->conn is NULL in xsmp_end_session() for a given GsmXsmpClient object, it implies that this same object in xsmp_stop() will also have a NULL SmsConn field. --- gnome-session/gsm-xsmp-client.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) --- a/gnome-session/gsm-xsmp-client.c +++ b/gnome-session/gsm-xsmp-client.c @@ -702,6 +702,13 @@ xsmp_stop (GsmClient *client, g_debug ("GsmXSMPClient: xsmp_stop ('%s')", xsmp->priv->description); + if (xsmp->priv->conn == NULL) { + g_set_error (error, + GSM_CLIENT_ERROR, + GSM_CLIENT_ERROR_NOT_REGISTERED, + "Client is not registered"); + return FALSE; + } SmsDie (xsmp->priv->conn); return TRUE;