diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-01-30 01:38:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-01-30 19:53:08 +0300 |
commit | 8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c (patch) | |
tree | a70f4d29fdc4b57e2204758c28139b20bd7473f5 /src/gui/gui.cpp | |
parent | e754d2d1f4f45238974d2136baf5eff0058784a4 (diff) | |
download | plus-8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c.tar.gz plus-8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c.tar.bz2 plus-8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c.tar.xz plus-8e244c7e5b6c98b1a6e67d4e387a9c231a42b15c.zip |
Add some missing checks to window resize code.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 11 |
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) |