summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkabeer khan <kabeer.khan@samsung.com>2015-03-06 16:34:01 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-03-06 16:34:04 +0100
commit7d500e3331dfac4d2a5ec834e0fd5124529b075f (patch)
treeecd46c39429e726c8c3b37bdee6907ef638c591a
parentbf96aadb2db50a14d6233aa6cdbe2b24a1351180 (diff)
test: fix crash of configuration test
Summary: Add extra check to prevent crashing when user clicks configuration test from elementary_test window Signed-off-by: kabeer khan <kabeer.khan@samsung.com> Reviewers: seoz, cedric Differential Revision: https://phab.enlightenment.org/D2086 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/bin/test_config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/test_config.c b/src/bin/test_config.c
index fe8159f65..bf032a73e 100644
--- a/src/bin/test_config.c
+++ b/src/bin/test_config.c
@@ -416,7 +416,7 @@ _plug_add(Evas_Object *win, Evas_Object *bx, const char *name)
416 } while(0) 416 } while(0)
417 417
418void 418void
419test_config(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 419test_config(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
420{ 420{
421 App_Data *ad; 421 App_Data *ad;
422 Prof_Data *pd = (Prof_Data *)data; 422 Prof_Data *pd = (Prof_Data *)data;
@@ -514,7 +514,7 @@ test_config(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS
514 evas_object_smart_callback_add(win, "profile,changed", _win_profile_changed_cb, NULL); 514 evas_object_smart_callback_add(win, "profile,changed", _win_profile_changed_cb, NULL);
515 evas_object_smart_callback_add(win, "delete,request", _win_del_cb, NULL); 515 evas_object_smart_callback_add(win, "delete,request", _win_del_cb, NULL);
516 516
517 if (pd) 517 if (pd && !obj) //obj is NULL when called by _bt_win_add but not when user clicks this test
518 { 518 {
519 if (pd->available_profiles[0]) 519 if (pd->available_profiles[0])
520 elm_win_available_profiles_set(win, 520 elm_win_available_profiles_set(win,