summaryrefslogtreecommitdiff
path: root/src/gui/widgets/progressbar.cpp
diff options
context:
space:
mode:
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);
}