e_plane: fix the dereference 94/148794/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 11 Sep 2017 02:02:49 +0000 (11:02 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 11 Sep 2017 02:02:49 +0000 (11:02 +0900)
Change-Id: Ibccf769d12ad479e3267ac20db2845c00c46cef0

src/bin/e_plane.c

index db01a9856ad9e120ee148541c4715eca1c2c32d8..0e934c8c01332f255335a286dc585ef51ef557b2 100755 (executable)
@@ -93,8 +93,9 @@ _get_tbm_surface_queue(E_Comp *e_comp)
      {
         Evas_Engine_Info_GL_Drm *info;
         info = (Evas_Engine_Info_GL_Drm *)evas_engine_info_get(e_comp->evas);
-        if (info->info.surface)
-          tbm_queue = gbm_tbm_get_surface_queue(info->info.surface);
+        EINA_SAFETY_ON_NULL_RETURN_VAL(info, NULL);
+        EINA_SAFETY_ON_NULL_RETURN_VAL(info->info.surface, NULL);
+        tbm_queue = gbm_tbm_get_surface_queue(info->info.surface);
      }
    else if(!strcmp(name, "gl_drm_tbm"))
      {