devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4ad176e4813aaff9f7fd66fdc8785023cc146600

commit 4ad176e4813aaff9f7fd66fdc8785023cc146600
Author: Chris Michael <[email protected]>
Date:   Wed Aug 13 09:38:33 2014 -0400

    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 <[email protected]>
---
 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 1451ac9..f3e2ab9 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);

-- 


Reply via email to