diff options
Diffstat (limited to 'src/resources/db/palettedb.cpp')
-rw-r--r-- | src/resources/db/palettedb.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp index 4da058d2a..a3caf62dc 100644 --- a/src/resources/db/palettedb.cpp +++ b/src/resources/db/palettedb.cpp @@ -34,7 +34,6 @@ namespace { bool mLoaded = false; std::map<std::string, DyeColor> mColors; - DyeColor mEmpty(0, 0, 0, 0); } void PaletteDB::load() @@ -113,11 +112,11 @@ void PaletteDB::unload() mColors.clear(); } -const DyeColor &PaletteDB::getColor(const std::string &name) +const DyeColor *PaletteDB::getColor(const std::string &name) { std::map<std::string, DyeColor>::const_iterator it = mColors.find(name); if (it != mColors.end()) - return (*it).second; + return &(*it).second; else - return mEmpty; + return nullptr; } |