From 880296bb7d93ce74153978f25c4bccbed61a340c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 25 Jul 2019 14:46:34 -0400 Subject: [PATCH] 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 --- src/bin/elementary/test_win_plug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/elementary/test_win_plug.c b/src/bin/elementary/test_win_plug.c index 615e6fa8d5..b94f324c10 100644 --- a/src/bin/elementary/test_win_plug.c +++ b/src/bin/elementary/test_win_plug.c @@ -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; }