From 69c7fb0d4b28448f9056d337b01b8c78e5e618d7 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 20 Aug 2012 11:58:10 -0300 Subject: [PATCH] bugfix: do not set popup elements if it ss_initiate was canceled. If we cancel ofono_ss_initiate() then we'll still have _ss_initiate_reply() called, but with an empty popup since it was deleted by the dismiss button. --- dialer/keypad.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dialer/keypad.c b/dialer/keypad.c index 4b12f22..bfaca4a 100644 --- a/dialer/keypad.c +++ b/dialer/keypad.c @@ -294,6 +294,11 @@ static void _ss_initiate_reply(void *data, OFono_Error err, const char *str) evas_object_show(ctx->ss_popup); } else if (err != OFONO_ERROR_NONE) { char buf[256]; + + /* no popup? then it was canceled */ + if (!ctx->ss_popup) + return; + snprintf(buf, sizeof(buf), "Could not complete.
Error #%d", err); gui_simple_popup_title_set(ctx->ss_popup, "Error"); -- 2.7.4