From John Vida Larring, "If an application initializes osgViewer::GraphicsWindowEmbedded() but never gets around to do any rendering before the application is closed, the result with be a crash (SIGABRT/std::logic_error) in osg::getGLVersionNumber().
The fix was to check whether glGetString( GL_VERSION ) returned a null pointer (Ref. svn diff below). The altered src/osg/GLExtensions.cpp is zipped and attached to this email."
This commit is contained in:
parent
0b5852948d
commit
8552faf774
@ -44,6 +44,8 @@ float osg::getGLVersionNumber()
|
||||
{
|
||||
// needs to be extended to do proper things with subversions like 1.5.1, etc.
|
||||
char *versionstring = (char*) glGetString( GL_VERSION );
|
||||
if (!versionstring) return 0.0;
|
||||
|
||||
std::string vs( versionstring );
|
||||
return( atof( vs.substr( 0, vs.find( " " ) ).c_str() ) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user