evas-gl-common: Fix incorrect expression
authorChris Michael <cp.michael@samsung.com>
Mon, 9 Jan 2017 00:48:26 +0000 (19:48 -0500)
committerChris Michael <cp.michael@samsung.com>
Mon, 9 Jan 2017 00:48:26 +0000 (19:48 -0500)
Coverity reports this as in incorrect expression because it was
checking cache_entry width <= 0 twice. Fairly safe to assume that the
proper check should be width || height.

Fix CID1368336

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/evas/engines/gl_common/evas_gl_texture.c

index c6f045a..8400593 100644 (file)
@@ -1174,7 +1174,7 @@ evas_gl_common_texture_upload(Evas_GL_Texture *tex, RGBA_Image *im, unsigned int
    GLuint fmt;
 
    if ((((int)im->cache_entry.w) <= 0) ||
-       (((int)im->cache_entry.w) <= 0)) return;
+       (((int)im->cache_entry.h) <= 0)) return;
    fmt = tex->pt->format;
    glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
    if (tex->gc->shared->info.unpack_row_length)