diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-04-02 01:23:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-04-02 01:23:15 +0300 |
commit | b96e34946aa326a9f8dfb80ce34cce9fc219405e (patch) | |
tree | 964b4d36e8a018c0c656b9d52a291202c7dc6704 /src/gui/widgets/window.cpp | |
parent | 91737976634821cef7d1e373ac8bf7a7b2e95a69 (diff) | |
download | manaverse-b96e34946aa326a9f8dfb80ce34cce9fc219405e.tar.gz manaverse-b96e34946aa326a9f8dfb80ce34cce9fc219405e.tar.bz2 manaverse-b96e34946aa326a9f8dfb80ce34cce9fc219405e.tar.xz manaverse-b96e34946aa326a9f8dfb80ce34cce9fc219405e.zip |
Add missing checks.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 3531ac245..14f39a4c3 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -273,13 +273,28 @@ void Window::setLocationRelativeTo(ImageRect::ImagePosition position, void Window::setMinWidth(int width) { - mMinWinWidth = width > mSkin->getMinWidth() ? width : mSkin->getMinWidth(); + if (mSkin) + { + mMinWinWidth = width > mSkin->getMinWidth() + ? width : mSkin->getMinWidth(); + } + else + { + mMinWinWidth = width; + } } void Window::setMinHeight(int height) { - mMinWinHeight = height > mSkin->getMinHeight() ? - height : mSkin->getMinHeight(); + if (mSkin) + { + mMinWinHeight = height > mSkin->getMinHeight() ? + height : mSkin->getMinHeight(); + } + else + { + mMinWinHeight = height; + } } void Window::setMaxWidth(int width) |