diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/popup.cpp | 21 | ||||
-rw-r--r-- | src/gui/widgets/scrollarea.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/tab.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/window.cpp | 21 |
4 files changed, 41 insertions, 7 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) diff --git a/src/gui/widgets/scrollarea.cpp b/src/gui/widgets/scrollarea.cpp index a78048314..0be492ee6 100644 --- a/src/gui/widgets/scrollarea.cpp +++ b/src/gui/widgets/scrollarea.cpp @@ -148,7 +148,8 @@ void ScrollArea::init() } } - textbox->decRef(); + if (textbox) + textbox->decRef(); // Load vertical scrollbar skin Image *vscroll = Theme::getImageFromTheme("vscroll_grey.png"); diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp index 6750ffbbc..73ffff30e 100644 --- a/src/gui/widgets/tab.cpp +++ b/src/gui/widgets/tab.cpp @@ -108,6 +108,9 @@ void Tab::init() for (mode = 0; mode < TAB_COUNT; mode++) { tab[mode] = Theme::getImageFromTheme(data[mode].file); + if (!tab[mode]) + continue; + a = 0; for (y = 0; y < 3; y++) { 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) |