[evas_gl] fixed svace issue 31/142031/2
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 2 Aug 2017 08:46:34 +0000 (17:46 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 2 Aug 2017 10:27:49 +0000 (10:27 +0000)
WGID 266441, 269645

Change-Id: I7a370419e8c96e759a13352a7ef72eef2d76c143

src/modules/evas/engines/gl_common/evas_gl_core.c
src/modules/evas/engines/gl_common/evas_gl_thread_gl.c

index 0446d18..bd99873 100644 (file)
@@ -3373,7 +3373,9 @@ evgl_api_get(void *eng_data, Evas_GL_Context_Version version, Eina_Bool alloc_on
         api = gles3_funcs;
      }
    else return NULL;
-   if (alloc_only && (api && api->version == EVAS_GL_API_VERSION))
+
+   if (!api) return NULL;
+   if (alloc_only && (api->version == EVAS_GL_API_VERSION))
      return api;
 
 #ifdef GL_GLES
index f83d363..0fa7660 100644 (file)
@@ -229,7 +229,7 @@ get_size(GLenum format, GLenum type, GLsizei width, GLsizei height)
    if (csize >= a)
       k = comp * l;
    else /* csize < a */
-      k = (a / csize) * ceil( (csize * comp * l) / a);
+      k = (int)(a / csize) * (int)ceil( (csize * comp * l) / a);
 
    return k * height * csize;
 }