summaryrefslogtreecommitdiff
path: root/src/gui/widgets/playerbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/playerbox.cpp')
-rw-r--r--src/gui/widgets/playerbox.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/widgets/playerbox.cpp b/src/gui/widgets/playerbox.cpp
index 0b0e548b2..0fdaa87c3 100644
--- a/src/gui/widgets/playerbox.cpp
+++ b/src/gui/widgets/playerbox.cpp
@@ -57,10 +57,11 @@ PlayerBox::PlayerBox(std::string skin) :
PlayerBox::~PlayerBox()
{
- if (Theme::instance())
+ Theme *const theme = Theme::instance();
+ if (theme)
{
- Theme::instance()->unload(mSkin);
- Theme::instance()->unloadRect(mBackground);
+ theme->unload(mSkin);
+ theme->unloadRect(mBackground);
}
mBeing = nullptr;