diff options
author | Jan <sentrycraft123@gmail.com> | 2024-06-24 14:38:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-24 14:38:56 +0200 |
commit | d52aaadc9ab0bd80ccd2a64818e64934adeefbf4 (patch) | |
tree | f995884e8f5e78d2b52ae5c397ee8bb540e37f22 /primedev/mods | |
parent | 4ada6a354e9480af1cfbf8a751e27dac11aa7f9c (diff) | |
download | NorthstarLauncher-d52aaadc9ab0bd80ccd2a64818e64934adeefbf4.tar.gz NorthstarLauncher-d52aaadc9ab0bd80ccd2a64818e64934adeefbf4.zip |
Add missing object check in mod manager (#731)v1.25.4-rc1
`HasMember` asserts `IsObject()` internally.
In release builds this is not an issue but this does not work on Debug builds.
Diffstat (limited to 'primedev/mods')
-rw-r--r-- | primedev/mods/modmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/primedev/mods/modmanager.cpp b/primedev/mods/modmanager.cpp index 98d4cdc4..edf69c9f 100644 --- a/primedev/mods/modmanager.cpp +++ b/primedev/mods/modmanager.cpp @@ -748,7 +748,7 @@ void ModManager::LoadMods() continue; // Add mod entry to enabledmods.json if it doesn't exist - if (!mod.m_bIsRemote && !m_EnabledModsCfg.HasMember(mod.Name.c_str())) + if (!mod.m_bIsRemote && m_bHasEnabledModsCfg && !m_EnabledModsCfg.HasMember(mod.Name.c_str())) { m_EnabledModsCfg.AddMember(rapidjson_document::StringRefType(mod.Name.c_str()), true, m_EnabledModsCfg.GetAllocator()); newModsDetected = true; |