Fixed Win95 crash when getenv("DISPLAY") returned NULL ptr.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@39 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
dheyse 2002-11-29 17:32:55 +00:00
parent 9c0f2dac0d
commit 32a82c18e4

View File

@ -366,6 +366,11 @@ void FGAPIENTRY glutInit( int* pargc, char** argv )
* Grab the environment variable indicating the X display to use.
* This is harmless under Win32, so let's let it stay here...
*/
#if TARGET_HOST_WIN32
if ( !getenv( "DISPLAY" ) )
displayName = strdup( "" );
else
#endif
displayName = strdup( getenv( "DISPLAY" ) );
/*