summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-01-30 01:38:06 +0300
committerAndrei Karas <akaras@inbox.ru>2012-01-30 19:53:08 +0300
commit8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c (patch)
treea70f4d29fdc4b57e2204758c28139b20bd7473f5 /src/game.cpp
parente754d2d1f4f45238974d2136baf5eff0058784a4 (diff)
downloadmv-8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c.tar.gz
mv-8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c.tar.bz2
mv-8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c.tar.xz
mv-8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c.zip
Add some missing checks to window resize code.
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);
}