OSDN Git Service

GlES2: Add NULL check
[android-x86/frameworks-native.git] / opengl / libs / GLES2 / gl2.cpp
index a56f12d..441d468 100644 (file)
@@ -163,7 +163,7 @@ const GLubyte * glGetString(GLenum name)
     const GLubyte * ret = egl_get_string_for_current_context(name);
     if (ret == NULL) {
         gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl;
-        ret = _c->glGetString(name);
+        if(_c) ret = _c->glGetString(name);
     }
     return ret;
 }