diff options
Diffstat (limited to 'src/gui/widgets/popup.cpp')
-rw-r--r-- | src/gui/widgets/popup.cpp | 21 |
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) |