Fixed nullref inside GetActiveServerMods

This commit is contained in:
Chomp
2025-03-10 10:28:53 +00:00
parent 062a2d003e
commit 43b042ab84
@@ -317,7 +317,11 @@ public class BackupService
*/
protected List<string> GetActiveServerMods()
{
var mods = _applicationContext?.GetLatestValue(ContextVariableType.LOADED_MOD_ASSEMBLIES).GetValue<List<SptMod>>();
var mods = _applicationContext?.GetLatestValue(ContextVariableType.LOADED_MOD_ASSEMBLIES)?.GetValue<List<SptMod>>();
if (mods == null)
{
return [];
}
List<string> result = [];
foreach (var mod in mods)