forked from enlightenment/efl
evas: fix dereference after null check
Summary: Static analysis tool reports passing a null pointer 'im->gc' to _evas_gl_image_cache_add which directly dereferences it, so lets be sure that 'im->gc' is valid before passing it to cache_add Reviewers: Hermet, jsuya, herb, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11676
This commit is contained in:
parent
9fd9a3b120
commit
90cc0c465c
|
@ -716,7 +716,7 @@ evas_gl_common_image_free(Evas_GL_Image *im)
|
|||
{
|
||||
if (!im->cs.no_free) free(im->cs.data);
|
||||
}
|
||||
if (im->cached)
|
||||
if (im->cached && im->gc)
|
||||
{
|
||||
if (_evas_gl_image_cache_add(im)) return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue