From b84ef109f6a7d1e8b492bf0376f81db37832cf05 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 29 Jul 2019 09:17:20 -0400 Subject: [PATCH] elm_test/modal_win: handle case where test is not passed the main window 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/elementary/test_win_modal.c b/src/bin/elementary/test_win_modal.c index 8775ead..2a82a38 100644 --- a/src/bin/elementary/test_win_modal.c +++ b/src/bin/elementary/test_win_modal.c @@ -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); -- 2.7.4