ecore-evas-wayland: Fix NULL pointer dereference

Coverity reports that accessing 'einfo' here is a NULL pointer
dereference. evas_engine_info_get can return NULL, so we should be
checking for a valid return before trying to use it.

Fixes Coverity CID1365654

@fix

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

View File

@ -1445,6 +1445,8 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas, void *event EINA_
* to pass to clients to do client side effects
*/
einfo = (Evas_Engine_Info_Wayland *)evas_engine_info_get(evas);
if (!einfo) return;
wdata = ee->engine.data;
einfo->window.x = wdata->win->geometry.x;
einfo->window.y = wdata->win->geometry.y;