Removed redundant NULL check for ad in _gl_pswd_check_box_sel()
[apps/native/ug-wifi-direct.git] / popup-wifidirect / src / wfd-app-popup-view.c
index b6e8ff2..461c40e 100755 (executable)
@@ -521,7 +521,8 @@ static Eina_Bool _keypad_popup_timer_cb(void *data)
 
        Evas_Object *label = (Evas_Object*) data;
        wfd_appdata_t *ad = wfd_get_appdata();
-       wfd_connection_info_s *connection = ad->connection;
+       wfd_connection_info_s *connection = NULL;
+
        WFD_RETV_IF(NULL == ad, FALSE, "NULL parameters(ad)\n");
        WFD_RETV_IF(NULL == label, FALSE, "NULL parameters(label)\n");
        if (NULL == ad->popup) {
@@ -529,6 +530,8 @@ static Eina_Bool _keypad_popup_timer_cb(void *data)
                return ECORE_CALLBACK_CANCEL;
        }
 
+       connection = ad->connection;
+
        keypad_popup_timeout--;
 
        if (keypad_popup_timeout > 0) {
@@ -935,8 +938,7 @@ static void _gl_pswd_check_box_sel(void *data, Evas_Object *obj, void *ei)
        elm_genlist_item_selected_set(item, EINA_FALSE);
        Eina_Bool state = elm_check_state_get(ck);
        elm_check_state_set(ck, !state);
-       if (ad)
-               _chk_changed_cb(ad->pin_entry, ck, NULL);
+       _chk_changed_cb(ad->pin_entry, ck, NULL);
 
        __WFD_APP_FUNC_EXIT__;
 }