Skip to content

Commit

Permalink
Merge pull request #531 from Wargus/mng_cache_fix
Browse files Browse the repository at this point in the history
Mng fixes
  • Loading branch information
Jarod42 authored Oct 8, 2023
2 parents e3b5b7e + 4e4d279 commit 178de8d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/video/mng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,10 @@ static std::map<std::string, Mng *> MngCache;
Mng *Mng::New(const std::string &name)
{
const std::string file = LibraryFileName(name);
Mng *mng = MngCache[file];
Mng *&mng = MngCache[file];
if (mng == nullptr) {
mng = new Mng();
mng->name = LibraryFileName(name);
Assert(mng);
}
mng->refcnt++;
return mng;
Expand Down

0 comments on commit 178de8d

Please sign in to comment.