diff options
author | Andrei Karas <akaras@inbox.ru> | 2010-05-05 00:36:41 +0300 |
---|---|---|
committer | Bertram <yohanndotferreiraatorange.fr> | 2010-05-13 00:21:48 +0200 |
commit | da50354af7fffe79ee7137a3f3dd9d8b9f34afda (patch) | |
tree | fc497b9a29dec5dacad514598665eced09d05baf /src/gui/widgets/icon.cpp | |
parent | 46cd4e737a5a74f823877c1fd00a6af84005612f (diff) | |
download | mana-client-da50354af7fffe79ee7137a3f3dd9d8b9f34afda.tar.gz mana-client-da50354af7fffe79ee7137a3f3dd9d8b9f34afda.tar.bz2 mana-client-da50354af7fffe79ee7137a3f3dd9d8b9f34afda.tar.xz mana-client-da50354af7fffe79ee7137a3f3dd9d8b9f34afda.zip |
Draw item image in item popups.
Now draw image only in chat item popup.
Reviewed-by: Bertram
Diffstat (limited to 'src/gui/widgets/icon.cpp')
-rw-r--r-- | src/gui/widgets/icon.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/widgets/icon.cpp b/src/gui/widgets/icon.cpp index ef22c37d..4e590212 100644 --- a/src/gui/widgets/icon.cpp +++ b/src/gui/widgets/icon.cpp @@ -30,20 +30,22 @@ Icon::Icon(const std::string &file) : mImage(0) { mImage = ResourceManager::getInstance()->getImage(file); - setSize(mImage->getWidth(), mImage->getHeight()); - + if (mImage) + setSize(mImage->getWidth(), mImage->getHeight()); } Icon::Icon(Image *image) : mImage(image) { - setSize(mImage->getWidth(), mImage->getHeight()); + if (mImage) + setSize(mImage->getWidth(), mImage->getHeight()); } void Icon::setImage(Image *image) { mImage = image; - setSize(mImage->getWidth(), mImage->getHeight()); + if (mImage) + setSize(mImage->getWidth(), mImage->getHeight()); } void Icon::draw(gcn::Graphics *g) |