summaryrefslogtreecommitdiffstats
path: root/src/voicecall.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/voicecall.c')
-rw-r--r--src/voicecall.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/voicecall.c b/src/voicecall.c
index 900477dd..89ad2371 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;
}