summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index b6e956c98..fcec7731b 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1947,6 +1947,8 @@ void Game::closeDialogs()
void Game::videoResized(int width, int height)
{
- viewport->setSize(width, height);
- windowMenu->setPosition(width - 3 - windowMenu->getWidth(), 3);
+ if (viewport)
+ viewport->setSize(width, height);
+ if (windowMenu)
+ windowMenu->setPosition(width - 3 - windowMenu->getWidth(), 3);
}