summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongyeon Kim <dy5.kim@samsung.com>2015-10-01 10:05:28 +0900
committerDongyeon Kim <dy5.kim@samsung.com>2015-10-01 10:05:28 +0900
commitb6649f6c6e18aebd0e8a7a8db8e0df931129b0cf (patch)
treed0238a755b3e670210c86084e5ea03b9ad234068
parentc2132a0666daf3d6dd99e710f8a7f100643fe731 (diff)
evas/gl_common: Fix memory leak for font glyph extension image
Evas_GL_Image created for font glyphs in evas_common_font_rgba_draw is sometimes freed after Evas_Engine_GL_Context is freed. Since gc is already freed, pt_unref returns and leaves pt behind.
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_texture.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c
index f2451c3c5f..f0eb72264b 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_texture.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c
@@ -946,11 +946,10 @@ void
946pt_unref(Evas_GL_Texture_Pool *pt) 946pt_unref(Evas_GL_Texture_Pool *pt)
947{ 947{
948 if (!pt) return; 948 if (!pt) return;
949 if (!pt->gc) return;
950 pt->references--; 949 pt->references--;
951 if (pt->references != 0) return; 950 if (pt->references != 0) return;
952 951
953 if (!((pt->render) || (pt->native))) 952 if ((pt->gc) && !((pt->render) || (pt->native)))
954 { 953 {
955 if (pt->whole) 954 if (pt->whole)
956 pt->gc->shared->tex.whole = 955 pt->gc->shared->tex.whole =