jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6f55b135c266f13858eb89ab2b89fd836c8aae05

commit 6f55b135c266f13858eb89ab2b89fd836c8aae05
Author: Dongyeon Kim <dy5....@samsung.com>
Date:   Tue Jun 16 13:47:16 2015 +0900

    evas/gl: Add null checks
    
    Summary: Add null check for glGetString version check and evgl_engine
    
    Test Plan: Local tests
    
    Reviewers: jpeg
    
    Reviewed By: jpeg
    
    Subscribers: wonsik, cedric
    
    Differential Revision: https://phab.enlightenment.org/D2699
---
 src/modules/evas/engines/gl_common/evas_gl_context.c | 5 +++++
 src/modules/evas/engines/gl_common/evas_gl_core.c    | 1 +
 2 files changed, 6 insertions(+)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index f79967a..07af300 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -386,6 +386,11 @@ _evas_gl_common_version_check(int *gles_ver)
    */
 
    version = (char *)glGetString(GL_VERSION);
+   if (!version)
+     {
+        /* Something is wrong! */
+        return 0;
+     }
 
   /*
    * OpengL ES
diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c 
b/src/modules/evas/engines/gl_common/evas_gl_core.c
index 3ea9c36..354a266 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.c
@@ -2890,6 +2890,7 @@ evgl_direct_partial_info_clear()
 void
 evgl_direct_override_get(Eina_Bool *override, Eina_Bool *force_off)
 {
+   if (!evgl_engine) return;
    if (override)  *override  = evgl_engine->direct_override;
    if (force_off) *force_off = evgl_engine->direct_force_off;
 }

-- 


Reply via email to