forked from enlightenment/efl
Evas (wayland_egl): Fix a series of various segfaults with the
wayland_egl engine caused by windows being hidden: From: Rob Bradford <rob@linux.intel.com> Date: Fri, 13 Jul 2012 19:13:12 +0100 Subject: [PATCH] evas(wayland_egl): Resolve a series of segfaults on clean-up The first was that when a window was being hidden the render engine (e->engine.data.output) was being assigned to NULL (like on an error path). I checked other backends and they only free and nullify this pointer on error paths. By doing it on a hide it was interfering with cleanup process for the object. This then highlighted a second crash from the derefence of the window to NULL when flushing the cache. If the window was hidden this window pointer would be NULL. The third it highlighted was a duplicate call into evas_gl_common_image_free and the freeing of the image cache twice. By the time eng_image_free has been called the cache has already been freed so we can remove the duplicate free. SVN revision: 74330
This commit is contained in:
parent
d288db2078
commit
1e42e445c5
|
@ -674,10 +674,9 @@ eng_setup(Evas *e, void *in)
|
|||
{
|
||||
eng_window_free(re->win);
|
||||
gl_wins--;
|
||||
re->win = NULL;
|
||||
}
|
||||
free(re);
|
||||
e->engine.data.output = NULL;
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
new_win = eng_window_new(re->info->info.display,
|
||||
|
@ -1472,7 +1471,6 @@ eng_image_free(void *data, void *image)
|
|||
re = (Render_Engine *)data;
|
||||
if (!image) return;
|
||||
eng_window_use(re->win);
|
||||
evas_gl_common_image_free(image);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1887,7 +1885,9 @@ eng_image_cache_flush(void *data)
|
|||
tmp_size = evas_common_image_get_cache();
|
||||
evas_common_image_set_cache(0);
|
||||
evas_common_rgba_image_scalecache_flush();
|
||||
evas_gl_common_image_cache_flush(re->win->gl_context);
|
||||
|
||||
if ((re) && (re->win) && (re->win->gl_context))
|
||||
evas_gl_common_image_cache_flush(re->win->gl_context);
|
||||
evas_common_image_set_cache(tmp_size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue