From 6667d3ee4b967daeee98806f0a6e97b7ac194771 Mon Sep 17 00:00:00 2001 From: OEOTYAN Date: Tue, 31 Dec 2024 14:10:10 +0800 Subject: [PATCH] fix: fix getModByHandle when loading mods --- src/ll/core/mod/NativeModManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ll/core/mod/NativeModManager.cpp b/src/ll/core/mod/NativeModManager.cpp index a1d9b31b5d..54109bd2c0 100644 --- a/src/ll/core/mod/NativeModManager.cpp +++ b/src/ll/core/mod/NativeModManager.cpp @@ -33,12 +33,12 @@ static std::shared_ptr currentLoadingMod; std::shared_ptr NativeModManager::getModByHandle(Handle handle) { auto l(lock()); - if (currentLoadingMod) { // for getCurrent before main - return currentLoadingMod; - } if (handleMap.contains(handle)) { return handleMap.at(handle); } + if (currentLoadingMod) { // for getCurrent before main + return currentLoadingMod; + } return {}; } static void