ecore_evas_wayland: Fix null pointer dereference

Coverity reports a null pointer dereference here because
evas_engine_info_get can return NULL. Check for a valid return before
trying to use it.

Fixes Coverity CID1365655

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2016-11-08 11:09:00 -05:00
parent 90dabc831f
commit 8a24d64030
1 changed files with 2 additions and 0 deletions

View File

@ -1915,6 +1915,8 @@ _ee_egl_display_unset(Ecore_Evas *ee)
Ecore_Evas_Engine_Wl_Data *wdata;
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(ee->evas);
if (!einfo) return;
einfo->info.wl_display = NULL;
wdata = ee->engine.data;
wdata->regen_objs = _evas_canvas_image_data_unset(ecore_evas_get(ee));