Coverity reports passing a null pointer 'im->gc' to
evas_gl_common_context_flush which directly dereferences it, so lets
be sure that 'im->gc' is valid before passing it to context_flush
Fixes CID1374273
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
EAPI void
evas_gl_common_image_free(Evas_GL_Image *im)
{
- if (!im) return ;
+ if (!im) return;
im->references--;
if (im->references > 0) return;
im->fglyph->ext_dat_free = NULL;
}
- evas_gl_common_context_flush(im->gc);
+ if (im->gc)
+ evas_gl_common_context_flush(im->gc);
evas_gl_common_image_preload_unwatch(im);