summaryrefslogtreecommitdiff
path: root/src/gui/widgets/progressbar.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-28 15:18:58 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-29 00:18:56 +0300
commitafbf2f713dd918bd0ff050d71afbf05bc581ab6e (patch)
tree6a06804aa813ed184b1293ab458929d372285385 /src/gui/widgets/progressbar.cpp
parent482cbfc4e1299434a6f632fe7f4b4e3704e65e87 (diff)
downloadmanaverse-afbf2f713dd918bd0ff050d71afbf05bc581ab6e.tar.gz
manaverse-afbf2f713dd918bd0ff050d71afbf05bc581ab6e.tar.bz2
manaverse-afbf2f713dd918bd0ff050d71afbf05bc581ab6e.tar.xz
manaverse-afbf2f713dd918bd0ff050d71afbf05bc581ab6e.zip
fix some missing checks.
Diffstat (limited to 'src/gui/widgets/progressbar.cpp')
-rw-r--r--src/gui/widgets/progressbar.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index 33e27a0d9..dc1e02ac5 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -71,8 +71,11 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress,
if (theme)
{
mSkin = theme->load("progressbar.xml", "");
- setPadding(mSkin->getPadding());
- mFillPadding = mSkin->getOption("fillPadding");
+ if (mSkin)
+ {
+ setPadding(mSkin->getPadding());
+ mFillPadding = mSkin->getOption("fillPadding");
+ }
setHeight(2 * mPadding + getFont()->getHeight() + 2);
}