e_hwc_window_queue: add null check for hwc_window
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 23 Jul 2019 12:34:30 +0000 (21:34 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Wed, 24 Jul 2019 12:27:34 +0000 (21:27 +0900)
Change-Id: I7ff22a30292387dcf28b0c743a2824d076d671f6

src/bin/e_hwc_window_queue.c

index ea0635df1412b129e8872dd83cb1655af772b906..3c4cd7b81b5e1dab32d174d044e50b155973597e 100644 (file)
@@ -778,10 +778,14 @@ _e_hwc_window_queue_unset(E_Hwc_Window_Queue *queue)
    if (eina_list_count(queue->user_pending_set))
      {
         hwc_window = eina_list_nth(queue->user_pending_set, 0);
-        if (!_e_hwc_window_queue_prepare_set(queue, hwc_window))
+        if (hwc_window)
           {
-             EHWQERR("fail to queue_prepare_set for user_pending_set hwc_window:%p", NULL, queue->hwc, queue, hwc_window);
-             _e_hwc_window_queue_tqueue_release(queue->tqueue, hwc_window);
+             if (!_e_hwc_window_queue_prepare_set(queue, hwc_window))
+               {
+                  EHWQERR("fail to queue_prepare_set for user_pending_set hwc_window:%p",
+                          NULL, queue->hwc, queue, hwc_window);
+                  _e_hwc_window_queue_tqueue_release(queue->tqueue, hwc_window);
+               }
           }
      }