From: Zofia Abramowska Date: Tue, 4 Apr 2017 15:09:09 +0000 (+0200) Subject: Fix hw key handler segfault X-Git-Tag: submit/tizen/20170405.143506~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e865db305044240eb1d6197368233bb2ad6c46a7;p=platform%2Fcore%2Fsecurity%2Faskuser.git Fix hw key handler segfault Hardware key can be intercepted when no popup is visible Change-Id: I0c3b562962393d2297aecdedb655811b81be4be8 --- diff --git a/src/agent/notification-daemon/ui/Popupper.cpp b/src/agent/notification-daemon/ui/Popupper.cpp index a5b4a04..955cea5 100644 --- a/src/agent/notification-daemon/ui/Popupper.cpp +++ b/src/agent/notification-daemon/ui/Popupper.cpp @@ -106,7 +106,7 @@ Eina_Bool Popupper::hwKeyClickedCb(void *data, int type, void *event) Ecore_Event_Key *ev = static_cast(event); Popupper* runner = static_cast(data); ALOGD("HW button pressed. type <" << type << "> pressed key is <" << ev->key << ">"); - if (!strcmp("XF86Home", ev->key) || !strcmp("XF86Back", ev->key)) { + if ((!strcmp("XF86Home", ev->key) || !strcmp("XF86Back", ev->key)) && runner->m_elementPtr) { ALOGD("Respond as deny once."); runner->m_popupResponseHandler(runner->m_elementPtr->getId(), NResponseType::None); }