forked from enlightenment/efl
evas - gl engine - async texture upload - protect null tex handle access
this stops a very blantant segv when accessing async->tex when it is NULL on _evas_gl_preload_main_loop_wakeup().
This commit is contained in:
parent
2f322e1273
commit
e03ab668a1
|
@ -102,18 +102,26 @@ _evas_gl_preload_main_loop_wakeup(void)
|
||||||
{
|
{
|
||||||
Eo *target;
|
Eo *target;
|
||||||
|
|
||||||
EINA_LIST_FREE(async->tex->targets, target)
|
if (async->tex)
|
||||||
eo_do(target, evas_obj_image_pixels_dirty_set(EINA_TRUE));
|
{
|
||||||
|
EINA_LIST_FREE(async->tex->targets, target)
|
||||||
|
eo_do(target, evas_obj_image_pixels_dirty_set(EINA_TRUE));
|
||||||
|
}
|
||||||
async->im->cache_entry.flags.preload_done = 0;
|
async->im->cache_entry.flags.preload_done = 0;
|
||||||
async->tex->was_preloaded = EINA_TRUE;
|
if (async->tex)
|
||||||
|
{
|
||||||
|
async->tex->was_preloaded = EINA_TRUE;
|
||||||
|
|
||||||
async->tex->ptt->allocations = eina_list_remove(async->tex->ptt->allocations, async->tex->aptt);
|
async->tex->ptt->allocations =
|
||||||
pt_unref(async->tex->ptt);
|
eina_list_remove(async->tex->ptt->allocations,
|
||||||
async->tex->ptt = NULL;
|
async->tex->aptt);
|
||||||
free(async->tex->aptt);
|
pt_unref(async->tex->ptt);
|
||||||
async->tex->aptt = NULL;
|
async->tex->ptt = NULL;
|
||||||
|
free(async->tex->aptt);
|
||||||
|
async->tex->aptt = NULL;
|
||||||
|
|
||||||
evas_gl_common_texture_free(async->tex, EINA_FALSE);
|
evas_gl_common_texture_free(async->tex, EINA_FALSE);
|
||||||
|
}
|
||||||
#ifdef EVAS_CSERVE2
|
#ifdef EVAS_CSERVE2
|
||||||
if (evas_cache2_image_cached(&async->im->cache_entry))
|
if (evas_cache2_image_cached(&async->im->cache_entry))
|
||||||
evas_cache2_image_close(&async->im->cache_entry);
|
evas_cache2_image_close(&async->im->cache_entry);
|
||||||
|
|
Loading…
Reference in New Issue