summaryrefslogtreecommitdiff
path: root/src/guichan/widgets/icon.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guichan/widgets/icon.cpp')
-rw-r--r--src/guichan/widgets/icon.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/guichan/widgets/icon.cpp b/src/guichan/widgets/icon.cpp
index d3d4d65ff..26139716d 100644
--- a/src/guichan/widgets/icon.cpp
+++ b/src/guichan/widgets/icon.cpp
@@ -64,11 +64,9 @@ namespace gcn
}
Icon::Icon(const std::string& filename) :
- mImage(nullptr),
- mInternalImage(false)
+ mImage(Image::load(filename)),
+ mInternalImage(true)
{
- mImage = Image::load(filename);
- mInternalImage = true;
setSize(mImage->getWidth(),
mImage->getHeight());
}