diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-08-14 22:13:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-08-14 22:13:04 +0300 |
commit | 41f47b3b0a9e0350b4955d4c05845eeca5143663 (patch) | |
tree | d89a0651d83f1de32b4ecd371f524b8dc902fe49 /src/gui/theme.cpp | |
parent | d0b0c1c8bbb8ce9fbf93887ed7dae5f779d17a21 (diff) | |
download | mv-41f47b3b0a9e0350b4955d4c05845eeca5143663.tar.gz mv-41f47b3b0a9e0350b4955d4c05845eeca5143663.tar.bz2 mv-41f47b3b0a9e0350b4955d4c05845eeca5143663.tar.xz mv-41f47b3b0a9e0350b4955d4c05845eeca5143663.zip |
add icons into tabs in chat emotes window.
Diffstat (limited to 'src/gui/theme.cpp')
-rw-r--r-- | src/gui/theme.cpp | 13 |
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); } |