aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Image.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/FbTk/Image.cc b/src/FbTk/Image.cc
index a7ff7e5..bc08c6c 100644
--- a/src/FbTk/Image.cc
+++ b/src/FbTk/Image.cc
@@ -66,8 +66,10 @@ void Image::shutdown() {
66 // for more than one type 66 // for more than one type
67 ImageMap::iterator it = s_image_map.begin(); 67 ImageMap::iterator it = s_image_map.begin();
68 ImageMap::iterator it_end = s_image_map.end(); 68 ImageMap::iterator it_end = s_image_map.end();
69 for (; it != it_end; it++) 69 for (; it != it_end; it++) {
70 handlers.insert(it->second); 70 if (it->second)
71 handlers.insert(it->second);
72 }
71 73
72 // free the unique handlers 74 // free the unique handlers
73 std::set<ImageBase*>::iterator handler_it = handlers.begin(); 75 std::set<ImageBase*>::iterator handler_it = handlers.begin();
@@ -87,9 +89,9 @@ PixmapWithMask *Image::load(const std::string &filename, int screen_num) {
87 89
88 // determine file ending 90 // determine file ending
89 std::string extension(StringUtil::toUpper(StringUtil::findExtension(filename))); 91 std::string extension(StringUtil::toUpper(StringUtil::findExtension(filename)));
90 92
91 // valid handle? 93 // valid handle?
92 if (s_image_map[extension] == 0) 94 if (s_image_map.find(extension) == s_image_map.end())
93 return false; 95 return false;
94 96
95 // load file 97 // load file