summaryrefslogtreecommitdiff
path: root/src/gui/gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r--src/gui/gui.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index e441111a9..1d8b45872 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -290,11 +290,14 @@ void Gui::videoResized()
{
WindowContainer *top = static_cast<WindowContainer*>(getTop());
- int oldWidth = top->getWidth();
- int oldHeight = top->getHeight();
+ if (top)
+ {
+ int oldWidth = top->getWidth();
+ int oldHeight = top->getHeight();
- top->setSize(mainGraphics->mWidth, mainGraphics->mHeight);
- top->adjustAfterResize(oldWidth, oldHeight);
+ top->setSize(mainGraphics->mWidth, mainGraphics->mHeight);
+ top->adjustAfterResize(oldWidth, oldHeight);
+ }
}
void Gui::setUseCustomCursor(bool customCursor)