evas: fix a NULL dereference issue 86/59186/3
authorMinwoo, Lee <minwoo47.lee@samsung.com>
Wed, 6 Jan 2016 19:24:16 +0000 (11:24 -0800)
committerYoungbok Shin <youngb.shin@samsung.com>
Wed, 17 Feb 2016 08:22:47 +0000 (00:22 -0800)
commit2de70c9a508530891355662dc20d7b9497b63ed9
tree64542fbcc5bb8ccf184848f671e67fd9407bfbfd
parenta2c3fb5942611af3a992b07a5d9372a7a5ff1c07
evas: fix a NULL dereference issue

Summary:
If evas engine init failed, it can make crash.
For example
If opengl init failed, then ee->prop.window is 0
ecore_evas_gl_x11_options_new_internal
{
   if (!ee->prop.window)
     {
        ERR("evas_engine_info_set() init engine '%s' failed.", ee->driver);
        ecore_evas_free(ee);
        return NULL;
     }
}

ecore_evas_free calls evas_fonts_zero_pressure
and this time evas->engine.func is NULL so it makes crash.

Reviewers: cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3542

Change-Id: I1f1becdc34856fe75a6de7eafb76ec78bfc8ccba
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/evas/canvas/evas_font_dir.c