all repos — fluxbox @ c7a3200730b3e2948cab3fdb43a786cb1b2f60f1

custom fork of the fluxbox windowmanager

small issues:

- added a guard so no invalid(0)-handler is deleted at shutdown

- "if (s_image_map[extension] == 0)" -> creates an entry for sure, we
  dont want this.
mathias mathias
commit

c7a3200730b3e2948cab3fdb43a786cb1b2f60f1

parent

1be23b544f929e03484b620b0ea917407f0f2ec3

1 files changed, 6 insertions(+), 4 deletions(-)

jump to
M src/FbTk/Image.ccsrc/FbTk/Image.cc

@@ -66,8 +66,10 @@ // one imagehandler could be registered

// for more than one type ImageMap::iterator it = s_image_map.begin(); ImageMap::iterator it_end = s_image_map.end(); - for (; it != it_end; it++) - handlers.insert(it->second); + for (; it != it_end; it++) { + if (it->second) + handlers.insert(it->second); + } // free the unique handlers std::set<ImageBase*>::iterator handler_it = handlers.begin();

@@ -87,9 +89,9 @@ return false;

// determine file ending std::string extension(StringUtil::toUpper(StringUtil::findExtension(filename))); - + // valid handle? - if (s_image_map[extension] == 0) + if (s_image_map.find(extension) == s_image_map.end()) return false; // load file