From 5371debc57f52f50da1fd772df39197b29ea3495 Mon Sep 17 00:00:00 2001 From: Evangelos Ribeiro Tzaras Date: Fri, 27 Aug 2021 17:40:03 +0200 Subject: [PATCH] sip: origin: Bail when trying to go online but nua handle is not present This fixes a segmentation fault. --- plugins/sip/calls-sip-origin.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/sip/calls-sip-origin.c b/plugins/sip/calls-sip-origin.c index 1557e77..af45311 100644 --- a/plugins/sip/calls-sip-origin.c +++ b/plugins/sip/calls-sip-origin.c @@ -888,6 +888,12 @@ go_online (CallsAccount *account, self = CALLS_SIP_ORIGIN (account); + if (!self->nua) { + g_warning ("Cannot go online: nua handle not initialized"); + g_object_notify_by_pspec (G_OBJECT (self), props[PROP_ACC_STATE]); + return; + } + if (online) { g_autofree char *registrar_url = NULL;