fix ScreenManager::Draw crash if no screens loaded (never happens normally)
This commit is contained in:
@@ -484,7 +484,7 @@ void ScreenManager::Draw()
|
|||||||
* that'll confuse the "zero out the next update after loading a screen logic.
|
* that'll confuse the "zero out the next update after loading a screen logic.
|
||||||
* If we don't render, don't call BeginFrame or EndFrame. That way, we won't
|
* If we don't render, don't call BeginFrame or EndFrame. That way, we won't
|
||||||
* clear the buffer, and we won't wait for vsync. */
|
* clear the buffer, and we won't wait for vsync. */
|
||||||
if( m_ScreenStack.back()->IsFirstUpdate() )
|
if( m_ScreenStack.size() && m_ScreenStack.back()->IsFirstUpdate() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( !DISPLAY->BeginFrame() )
|
if( !DISPLAY->BeginFrame() )
|
||||||
|
|||||||
Reference in New Issue
Block a user