e_policy_wl: Add missing NULL check 67/261867/1
authorSeunghun Lee <chwila927@gmail.com>
Wed, 28 Jul 2021 04:09:34 +0000 (13:09 +0900)
committerSeunghun Lee <chwila927@gmail.com>
Wed, 28 Jul 2021 04:16:07 +0000 (13:16 +0900)
The NULL check was accidentally missed from the commit:

commit 365cf23f85795c691edddc836425bcbf34c96f29
Author: Seunghun Lee <shiin.lee@samsung.com>
Date:   Tue Jul 20 09:45:18 2021 +0900

    Move fake implementations for sub-surface to e_policy_wl

Change-Id: Ibc53c81cfa6ba551f026b352f92b0cb6855183b0

src/bin/e_policy_wl.c

index 37146c1f5a2b86a053426437b5864d60888c666d..e58d14394fe1a78b1cefa97945f01939e2268a75 100644 (file)
@@ -2139,7 +2139,8 @@ _tzpol_iface_cb_subsurface_get(struct wl_client *client, struct wl_resource *res
         ELOGF("TZPOL", "SUBSURF   | Invalid parent(%p). "
               "Create with fake implementation", ec, epc);
         cdata = e_client_cdata_get(ec);
-        if (cdata)
+        if ((cdata) &&
+            (cdata->sub.watcher))
           {
              tizen_subsurface_watcher_send_message(cdata->sub.watcher,
                                                    TIZEN_SUBSURFACE_WATCHER_MSG_PARENT_ID_INVALID);