fix native surface null set crash bug.

SVN revision: 76898
This commit is contained in:
Carsten Haitzler 2012-09-20 09:16:57 +00:00
parent 2dc64f6639
commit 15fbdbbcf0
3 changed files with 8 additions and 2 deletions

View File

@ -1044,3 +1044,8 @@
* Add evas_device API for being able to register devices, set * Add evas_device API for being able to register devices, set
their names, descriptions, classes, parents, sources etc. etc. their names, descriptions, classes, parents, sources etc. etc.
2012-09-20 Carsten Haitzler (The Rasterman)
* Fix native surface crash when setting to null in some
situations.

View File

@ -20,6 +20,7 @@ Fixes:
* Fix EGL/GLES dest alpha rendering bug (no rendering). * Fix EGL/GLES dest alpha rendering bug (no rendering).
* Fix evas_object_image_alpha_set when image data not loaded yet. * Fix evas_object_image_alpha_set when image data not loaded yet.
* Fix map surface leak. * Fix map surface leak.
* Fix native surface set to null crash bug in gl engine.
Evas 1.7.0 Evas 1.7.0

View File

@ -2035,7 +2035,7 @@ eng_image_native_set(void *data, void *image, void *native)
if (!im) if (!im)
{ {
if ((!ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL)) if ((ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL))
{ {
im = evas_gl_common_image_new_from_data(re->win->gl_context, im = evas_gl_common_image_new_from_data(re->win->gl_context,
ns->data.opengl.w, ns->data.opengl.w,
@ -2044,7 +2044,7 @@ eng_image_native_set(void *data, void *image, void *native)
EVAS_COLORSPACE_ARGB8888); EVAS_COLORSPACE_ARGB8888);
} }
else else
return NULL; return NULL;
} }
if (ns) if (ns)