Applied Bruce Merry's patch fixing bug #206 (segfault on shutdown in the AMD/ATI fglrx driver).
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1640 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
65e227d03d
commit
2b5292bb4f
@ -182,6 +182,14 @@ void fgPlatformInitialize( const char* displayName )
|
|||||||
if( !glXQueryExtension( fgDisplay.pDisplay.Display, NULL, NULL ) )
|
if( !glXQueryExtension( fgDisplay.pDisplay.Display, NULL, NULL ) )
|
||||||
fgError( "OpenGL GLX extension not supported by display '%s'",
|
fgError( "OpenGL GLX extension not supported by display '%s'",
|
||||||
XDisplayName( displayName ) );
|
XDisplayName( displayName ) );
|
||||||
|
|
||||||
|
/* This forces AMD Catalyst drivers to initialize and register a shutdown
|
||||||
|
* function, which must be done before our own call to atexit to prevent
|
||||||
|
* a crash if glutMainLoop is not called or is not exited cleanly.
|
||||||
|
* (see bug #206)
|
||||||
|
*/
|
||||||
|
glXQueryExtensionsString( fgDisplay.pDisplay.Display,
|
||||||
|
DefaultScreen( fgDisplay.pDisplay.Display ));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fgDisplay.pDisplay.Screen = DefaultScreen( fgDisplay.pDisplay.Display );
|
fgDisplay.pDisplay.Screen = DefaultScreen( fgDisplay.pDisplay.Display );
|
||||||
|
Reference in New Issue
Block a user