From 7ee8d3a16abea1913d2a1c6bfef70dc9d8ba35f1 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Sat, 24 Nov 2012 21:55:04 -0600 Subject: [PATCH] voicecall: Fix crash --- src/voicecall.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/voicecall.c b/src/voicecall.c index 900477d..89ad237 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -3873,11 +3873,14 @@ void __ofono_voicecall_set_alpha_and_icon_id(struct ofono_voicecall *vc, void __ofono_voicecall_clear_alpha_and_icon_id(struct ofono_voicecall *vc) { - g_free(vc->dial_req->message); - vc->dial_req->message = NULL; - g_free(vc->dial_req); - vc->dial_req = NULL; + if (vc->dial_req) { + g_free(vc->dial_req->message); + vc->dial_req->message = NULL; + + g_free(vc->dial_req); + vc->dial_req = NULL; + } vc->flags &= ~VOICECALL_FLAG_STK_MODEM_CALLSETUP; } -- 2.7.4