From d68d01262e59593e7976afea1b1c458815448e7a Mon Sep 17 00:00:00 2001 From: Dmitri Savolainen Date: Fri, 7 Oct 2016 19:23:41 +0300 Subject: [PATCH] presence: fix crush if dialog id is NULL - check dialog_id is not NULL before call delete_presentity_if_dialog_id_exists --- modules/presence/presentity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/presence/presentity.c b/modules/presence/presentity.c index 00fdbfdcbb8..cb819cfd4b4 100644 --- a/modules/presence/presentity.c +++ b/modules/presence/presentity.c @@ -691,7 +691,7 @@ int update_presentity(struct sip_msg* msg, presentity_t* presentity, str* body, } check_if_dialog(*body, &is_dialog, &dialog_id); - if (is_dialog == 1) { + if ( dialog_id ) { if (delete_presentity_if_dialog_id_exists(presentity, dialog_id) < 0) { goto error; }