From 8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 30 Jan 2012 01:38:06 +0300 Subject: Add some missing checks to window resize code. --- src/game.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/game.cpp') 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); } -- cgit v1.2.3-60-g2f50