summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-14 22:13:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-14 22:13:04 +0300
commit41f47b3b0a9e0350b4955d4c05845eeca5143663 (patch)
treed89a0651d83f1de32b4ecd371f524b8dc902fe49 /src/gui/theme.cpp
parentd0b0c1c8bbb8ce9fbf93887ed7dae5f779d17a21 (diff)
downloadmanaplus-41f47b3b0a9e0350b4955d4c05845eeca5143663.tar.gz
manaplus-41f47b3b0a9e0350b4955d4c05845eeca5143663.tar.bz2
manaplus-41f47b3b0a9e0350b4955d4c05845eeca5143663.tar.xz
manaplus-41f47b3b0a9e0350b4955d4c05845eeca5143663.zip
add icons into tabs in chat emotes window.
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r--src/gui/theme.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp
index f117563b5..36841b53d 100644
--- a/src/gui/theme.cpp
+++ b/src/gui/theme.cpp
@@ -1205,11 +1205,14 @@ ImageSet *Theme::getImageSetFromThemeXml(const std::string &name,
if (rect.grid[0])
{
Image *const image = rect.grid[0];
-
- ResourceManager *const resman = ResourceManager::getInstance();
- ImageSet *const imageSet = resman->getSubImageSet(image, w, h);
- theme->unload(skin);
- return imageSet;
+ const SDL_Rect &rect = image->mBounds;
+ if (rect.w && rect.h)
+ {
+ ResourceManager *const resman = ResourceManager::getInstance();
+ ImageSet *const imageSet = resman->getSubImageSet(image, w, h);
+ theme->unload(skin);
+ return imageSet;
+ }
}
theme->unload(skin);
}