evas-render2: Fix Coverity CID1306141: Dereference null return value
authorChris Michael <cp.michael@samsung.com>
Thu, 18 Jun 2015 14:24:40 +0000 (10:24 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 18 Jun 2015 14:24:40 +0000 (10:24 -0400)
Summary: Coverity reports that eina_thread_queue_wait was returning
NULL and thus msg variable being used here causes dereferencing a null
pointer.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/evas/canvas/render2/evas_render2_th_main.c

index c462d87..54b3428 100644 (file)
@@ -247,7 +247,8 @@ _evas_render2_th_main(void *data EINA_UNUSED, Eina_Thread thread EINA_UNUSED)
    for (;;)
      {
         msg = eina_thread_queue_wait(_th_main_queue, &ref);
-        _evas_render2_th_main_do(msg->eo_e, msg->e);
+        if (msg)
+          _evas_render2_th_main_do(msg->eo_e, msg->e);
         eina_thread_queue_wait_done(_th_main_queue, ref);
      }
    return NULL;