summaryrefslogtreecommitdiff
path: root/src/gui/theme.cpp
diff options
context:
space:
mode:
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);
}