Skip to content

Commit

Permalink
Add missing object check in mod manager (#731)
Browse files Browse the repository at this point in the history
`HasMember` asserts `IsObject()` internally.
In release builds this is not an issue but this does not work on Debug builds.
  • Loading branch information
Jan200101 authored Jun 24, 2024
1 parent 4ada6a3 commit d52aaad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion primedev/mods/modmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d52aaad

Please sign in to comment.