int i;
ad = (appdata_s *)application_info;
- if (ad == NULL) {
- elm_genlist_item_class_free(itc);
- elm_genlist_item_class_free(ttc);
- elm_genlist_item_class_free(utc);
- elm_genlist_item_class_free(ptc);
-
- return;
- }
+ if (ad == NULL)
+ goto out;
genlist = elm_genlist_add(ad->nf);
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
i = 0;
id = calloc(sizeof(Item_Data), 1);
+ if (id == NULL)
+ goto out;
+
id->index = i;
id->item = elm_genlist_item_append(genlist, itc, id, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel_poweroff_cb, ops);
i++;
id = calloc(sizeof(Item_Data), 1);
+ if (id == NULL)
+ goto out;
+
id->index = i;
id->item = elm_genlist_item_append(genlist, utc, id, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel_airplane_cb, ops);
elm_genlist_item_append(genlist, ptc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, genlist, "empty");
+ elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->win);
+out:
elm_genlist_item_class_free(itc);
elm_genlist_item_class_free(ttc);
elm_genlist_item_class_free(utc);
elm_genlist_item_class_free(ptc);
-
- nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, genlist, "empty");
- elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->win);
}
static void
int i;
ad = (appdata_s *)application_info;
- if (ad == NULL) {
- elm_genlist_item_class_free(itc);
- elm_genlist_item_class_free(ttc);
- elm_genlist_item_class_free(ptc);
-
- return;
- };
+ if (ad == NULL)
+ goto out;
genlist = elm_genlist_add(ad->nf);
elm_genlist_mode_set(genlist, ELM_LIST_COMPRESS);
i = 0;
id = calloc(sizeof(Item_Data), 1);
+ if (id == NULL)
+ goto out;
+
id->index = i;
id->item = elm_genlist_item_append(genlist, itc, id, NULL, ELM_GENLIST_ITEM_NONE, _gl_sel_poweroff_cb, ops);
elm_genlist_item_append(genlist, ptc, NULL, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
+ nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, genlist, "empty");
+ elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->win);
+
+out:
elm_genlist_item_class_free(itc);
elm_genlist_item_class_free(ttc);
elm_genlist_item_class_free(ptc);
-
- nf_it = elm_naviframe_item_push(ad->nf, NULL, NULL, NULL, genlist, "empty");
- elm_naviframe_item_pop_cb_set(nf_it, naviframe_pop_cb, ad->win);
}
static int powerkey_list(bundle *b, const struct popup_ops *ops)