ecore_evas: fix a potentional deref after null problem

Summary:
this patch modify a logic to return after,
failing to call eore_evas_buffer_allocfunc_new function.

Reviewers: Hermet, bu5hm4n, cedric, devilhorns

Reviewed By: devilhorns

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7918
This commit is contained in:
Wonki Kim 2019-02-13 10:42:24 -05:00 committed by Christopher Michael
parent 0fed1c77ae
commit 80b364f392
1 changed files with 5 additions and 1 deletions

View File

@ -896,7 +896,11 @@ ecore_evas_buffer_new(int w, int h)
ecore_evas_buffer_allocfunc_new(w, h, _ecore_evas_buffer_pix_alloc,
_ecore_evas_buffer_pix_free, NULL);
if (!ee) ecore_event_evas_shutdown();
if (!ee)
{
ecore_event_evas_shutdown();
return NULL;
}
ecore_evas_done(ee, EINA_TRUE);