From 4ad176e4813aaff9f7fd66fdc8785023cc146600 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 13 Aug 2014 09:38:33 -0400 Subject: [PATCH] evas-gl-common: Fix invalid use of Texture We cannot use the texture to find a valid format Before the texture is actually created. This is invalid, leads to "warning: tex is used uninitialized' message from the compiler, and just plain wrong. Instead, use the alpha property of the Evas_GL_Image to find the proper texture format, Then create the texture. @fix Signed-off-by: Chris Michael --- src/modules/evas/engines/gl_common/evas_gl_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_texture.c b/src/modules/evas/engines/gl_common/evas_gl_texture.c index 1451ac9c58..f3e2ab9333 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_texture.c +++ b/src/modules/evas/engines/gl_common/evas_gl_texture.c @@ -998,7 +998,7 @@ evas_gl_common_texture_dynamic_new(Evas_Engine_GL_Context *gc, Evas_GL_Image *im Evas_GL_Texture *tex; int lformat; - lformat = _evas_gl_texture_search_format(tex->alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888); + lformat = _evas_gl_texture_search_format(im->alpha, gc->shared->info.bgra, EVAS_COLORSPACE_ARGB8888); if (lformat < 0) return NULL; tex = evas_gl_common_texture_alloc(gc, im->w, im->h, im->alpha);