Skip to content

Commit d52aaad

Browse files
authored
Add missing object check in mod manager (#731)
`HasMember` asserts `IsObject()` internally. In release builds this is not an issue but this does not work on Debug builds.
1 parent 4ada6a3 commit d52aaad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

primedev/mods/modmanager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ void ModManager::LoadMods()
748748
continue;
749749

750750
// Add mod entry to enabledmods.json if it doesn't exist
751-
if (!mod.m_bIsRemote && !m_EnabledModsCfg.HasMember(mod.Name.c_str()))
751+
if (!mod.m_bIsRemote && m_bHasEnabledModsCfg && !m_EnabledModsCfg.HasMember(mod.Name.c_str()))
752752
{
753753
m_EnabledModsCfg.AddMember(rapidjson_document::StringRefType(mod.Name.c_str()), true, m_EnabledModsCfg.GetAllocator());
754754
newModsDetected = true;

0 commit comments

Comments
 (0)