summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_image.c
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2020-04-10 08:45:22 -0400
committerMike Blumenkrantz <zmike@samsung.com>2020-04-10 08:45:22 -0400
commit90cc0c465cd7ea4085170b2bfeb8ba7ebf29eee2 (patch)
tree7df591a3c5a5d604a48b4ceeca0f68ef5e10320a /src/modules/evas/engines/gl_common/evas_gl_image.c
parent9fd9a3b120fe9bef32af1fcc0742a9f875f484d8 (diff)
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
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c b/src/modules/evas/engines/gl_common/evas_gl_image.c
index 37de0ba068..41806c1ea6 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -716,7 +716,7 @@ evas_gl_common_image_free(Evas_GL_Image *im)
716 { 716 {
717 if (!im->cs.no_free) free(im->cs.data); 717 if (!im->cs.no_free) free(im->cs.data);
718 } 718 }
719 if (im->cached) 719 if (im->cached && im->gc)
720 { 720 {
721 if (_evas_gl_image_cache_add(im)) return; 721 if (_evas_gl_image_cache_add(im)) return;
722 } 722 }