elm_test/plug: fix error handling

Summary:
if plug connection fails, a notification can't always be created because
there may be no object passed to this function to create a notify object on

@fix

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl_widgets

Differential Revision: https://phab.enlightenment.org/D9400
This commit is contained in:
Mike Blumenkrantz 2019-07-25 14:46:34 -04:00 committed by Christopher Michael
parent 485d2e37d8
commit 880296bb7d
1 changed files with 4 additions and 1 deletions

View File

@ -196,7 +196,10 @@ test_win_plug(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UN
evas_object_event_callback_add(plug, EVAS_CALLBACK_DEL, _timer_del, NULL);
if (!elm_plug_connect(plug, "ello", 0, EINA_FALSE))
{
_notify_error(data, "Unable to connect to the Window Socket!");
if (data)
_notify_error(data, "Unable to connect to the Window Socket!");
else
fprintf(stderr, "Unable to connect to the Window Socket!\n");
evas_object_del(win);
return;
}