diff --git a/src/osg/Program.cpp b/src/osg/Program.cpp index 14ad61e34..f4f3298c2 100644 --- a/src/osg/Program.cpp +++ b/src/osg/Program.cpp @@ -270,7 +270,14 @@ void GL2Extensions::lowestCommonDenominator(const GL2Extensions& rhs) void GL2Extensions::setupGL2Extensions(unsigned int contextID) { - _glVersion = atof( (const char*)glGetString( GL_VERSION ) ); + const char* version = (const char*) glGetString( GL_VERSION ); + if (!version) + { + osg::notify(osg::FATAL)<<"Error: OpenGL version test failed, requires valid graphics context."<