Evas: Fix crash in GL engine(s) during preload cancel

In my config, running terminology with the GL engine and under
cserve2, some image could not be loaded. The tex argument
in evas_gl_preload_target_[un]register was NULL, leading to
an immediate crash.
This commit is contained in:
Jean-Philippe Andre 2013-12-09 17:28:02 +09:00
parent 13caf63420
commit ce166ec223
1 changed files with 4 additions and 0 deletions

View File

@ -408,6 +408,8 @@ _evas_gl_preload_target_die(void *data, Eo *obj,
void
evas_gl_preload_target_register(Evas_GL_Texture *tex, Eo *target)
{
EINA_SAFETY_ON_NULL_RETURN(tex);
eo_do(target,
eo_event_callback_add(EO_EV_DEL, _evas_gl_preload_target_die, tex));
tex->targets = eina_list_append(tex->targets, target);
@ -420,6 +422,8 @@ evas_gl_preload_target_unregister(Evas_GL_Texture *tex, Eo *target)
Eina_List *l;
const Eo *o;
EINA_SAFETY_ON_NULL_RETURN(tex);
eo_do(target,
eo_event_callback_del(EO_EV_DEL, _evas_gl_preload_target_die, tex));