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.
This commit is contained in:
Dongyeon Kim 2015-10-01 10:05:28 +09:00
parent c2132a0666
commit b6649f6c6e
1 changed files with 1 additions and 2 deletions

View File

@ -946,11 +946,10 @@ void
pt_unref(Evas_GL_Texture_Pool *pt) pt_unref(Evas_GL_Texture_Pool *pt)
{ {
if (!pt) return; if (!pt) return;
if (!pt->gc) return;
pt->references--; pt->references--;
if (pt->references != 0) return; if (pt->references != 0) return;
if (!((pt->render) || (pt->native))) if ((pt->gc) && !((pt->render) || (pt->native)))
{ {
if (pt->whole) if (pt->whole)
pt->gc->shared->tex.whole = pt->gc->shared->tex.whole =