summaryrefslogtreecommitdiff
path: root/src/gui/widgets/popup.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-04-02 01:23:15 +0300
committerAndrei Karas <akaras@inbox.ru>2011-04-02 01:23:15 +0300
commitb96e34946aa326a9f8dfb80ce34cce9fc219405e (patch)
tree964b4d36e8a018c0c656b9d52a291202c7dc6704 /src/gui/widgets/popup.cpp
parent91737976634821cef7d1e373ac8bf7a7b2e95a69 (diff)
downloadplus-b96e34946aa326a9f8dfb80ce34cce9fc219405e.tar.gz
plus-b96e34946aa326a9f8dfb80ce34cce9fc219405e.tar.bz2
plus-b96e34946aa326a9f8dfb80ce34cce9fc219405e.tar.xz
plus-b96e34946aa326a9f8dfb80ce34cce9fc219405e.zip
Add missing checks.
Diffstat (limited to 'src/gui/widgets/popup.cpp')
-rw-r--r--src/gui/widgets/popup.cpp21
1 files changed, 18 insertions, 3 deletions
diff --git a/src/gui/widgets/popup.cpp b/src/gui/widgets/popup.cpp
index 7519d1583..bc15a4c2c 100644
--- a/src/gui/widgets/popup.cpp
+++ b/src/gui/widgets/popup.cpp
@@ -142,13 +142,28 @@ void Popup::setLocationRelativeTo(gcn::Widget *widget)
void Popup::setMinWidth(int width)
{
- mMinWidth = width > mSkin->getMinWidth() ? width : mSkin->getMinWidth();
+ if (mSkin)
+ {
+ mMinWidth = width > mSkin->getMinWidth()
+ ? width : mSkin->getMinWidth();
+ }
+ else
+ {
+ mMinWidth = width;
+ }
}
void Popup::setMinHeight(int height)
{
- mMinHeight = height > mSkin->getMinHeight() ?
- height : mSkin->getMinHeight();
+ if (mSkin)
+ {
+ mMinHeight = height > mSkin->getMinHeight() ?
+ height : mSkin->getMinHeight();
+ }
+ else
+ {
+ mMinHeight = height;
+ }
}
void Popup::setMaxWidth(int width)