From 4e4d279ffe0b62e406b2e2db33fa3c5bcd836315 Mon Sep 17 00:00:00 2001 From: Jarod42 Date: Sat, 7 Oct 2023 23:49:52 +0200 Subject: [PATCH] - Fix mng cache. - `new` doesn't return `nullptr` (but throw), so `Assert` is useless (was misplaced anyway). --- src/video/mng.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video/mng.cpp b/src/video/mng.cpp index 4d1b852d1e..95c2aab53e 100644 --- a/src/video/mng.cpp +++ b/src/video/mng.cpp @@ -226,11 +226,10 @@ static std::map 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;