OPENGL: add checks for case when glGetString return NULL
This commit is contained in:
parent
68ee863367
commit
4e47c03a64
2 changed files with 5 additions and 1 deletions
|
@ -131,6 +131,10 @@ void Context::initialize(ContextType contextType) {
|
|||
|
||||
int Context::getGLSLVersion() const {
|
||||
const char *glslVersionString = (const char *)glGetString(GL_SHADING_LANGUAGE_VERSION);
|
||||
if (!glslVersionString) {
|
||||
warning("Could not get GLSL version");
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *glslVersionFormat;
|
||||
if (type == kContextGL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue