Commit 2a13f016 authored by Robert Menzel's avatar Robert Menzel

added error check

parent 70de835d
......@@ -136,6 +136,10 @@ uint32_t privateGetOpenGLVersion( int _type )
const GLubyte* versionString;
versionString = glGetString(GL_VERSION);
if (versionString == NULL) {
ACGL::Utils::error() << "cannot get OpenGL version" << std::endl;
return 0;
}
int positionOfFirstDot = 0;
while ((versionString[positionOfFirstDot] != '\0') && (versionString[positionOfFirstDot] != '.')) ++positionOfFirstDot;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment