diff --git a/stepmania/src/archutils/Win32/GraphicsWindow.cpp b/stepmania/src/archutils/Win32/GraphicsWindow.cpp index 497eaaaf6a..217e77e099 100644 --- a/stepmania/src/archutils/Win32/GraphicsWindow.cpp +++ b/stepmania/src/archutils/Win32/GraphicsWindow.cpp @@ -391,8 +391,6 @@ RageDisplay::VideoModeParams GraphicsWindow::GetParams() void GraphicsWindow::Update() { - ASSERT( DISPLAY ); - MSG msg; while( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) ) { @@ -406,11 +404,13 @@ void GraphicsWindow::Update() g_bLastHasFocus = g_bHasFocus; } - if( g_bResolutionChanged ) + if( g_bResolutionChanged && DISPLAY != NULL ) { - /* Let DISPLAY know that our resolution has changed. */ - DISPLAY->ResolutionChanged(); + /* Let DISPLAY know that our resolution has changed. (Note that + * ResolutionChanged() can come back here, so reset g_bResolutionChanged + * first.) */ g_bResolutionChanged = false; + DISPLAY->ResolutionChanged(); } }