that was too quick, fgStructure.CurrentWindow can be NULL when glutGetting window
width or height git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1485 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
1917f56dce
commit
0715a20796
@ -177,7 +177,6 @@ int fgPlatformGlutGet ( GLenum eWhat )
|
||||
RECT winRect;
|
||||
POINT topLeft = {0,0};
|
||||
|
||||
freeglut_return_val_if_fail( fgStructure.CurrentWindow != NULL, 0 );
|
||||
|
||||
#if defined(_WIN32_WCE)
|
||||
GetWindowRect( fgStructure.CurrentWindow->Window.Handle, &winRect);
|
||||
@ -203,8 +202,10 @@ int fgPlatformGlutGet ( GLenum eWhat )
|
||||
break;
|
||||
|
||||
case GLUT_WINDOW_WIDTH:
|
||||
freeglut_return_val_if_fail( fgStructure.CurrentWindow != NULL, 0 );
|
||||
return fgStructure.CurrentWindow->State.Width;
|
||||
case GLUT_WINDOW_HEIGHT:
|
||||
freeglut_return_val_if_fail( fgStructure.CurrentWindow != NULL, 0 );
|
||||
return fgStructure.CurrentWindow->State.Height;
|
||||
|
||||
case GLUT_WINDOW_BORDER_WIDTH :
|
||||
|
Reference in New Issue
Block a user