elm_test/modal_win: handle case where test is not passed the main window
authorMike Blumenkrantz <zmike@samsung.com>
Mon, 29 Jul 2019 13:17:20 +0000 (09:17 -0400)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 5 Aug 2019 01:48:31 +0000 (10:48 +0900)
Summary:
this test is not runnable when it is not triggered directly from pressing
a button in the main window

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, bu5hm4n, cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9401

src/bin/elementary/test_win_modal.c

index 8775ead..2a82a38 100644 (file)
@@ -27,6 +27,11 @@ test_win_modal(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_U
 {
    Evas_Object *parent_win, *win, *bg, *txt, *bx, *bt;
 
+   if (!obj)
+     {
+        fprintf(stderr, "The modal win test can only be run by clicking the button for it in the main elementary_test window.\n");
+        return;
+     }
    parent_win = _parent_win_get(obj);
 
    win = elm_win_add(parent_win, "modal", ELM_WIN_BASIC);