bugfix: do not set popup elements if it ss_initiate was canceled.
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Mon, 20 Aug 2012 14:58:10 +0000 (11:58 -0300)
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>
Mon, 20 Aug 2012 14:58:10 +0000 (11:58 -0300)
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

index 4b12f22..bfaca4a 100644 (file)
@@ -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.<br>Error #%d",
                                err);
                gui_simple_popup_title_set(ctx->ss_popup, "Error");