Skip to content

Commit

Permalink
Fix NullRef exception when loading legacy saves
Browse files Browse the repository at this point in the history
  • Loading branch information
KongMD-Steam committed Jan 24, 2020
1 parent 2290ece commit 4447f19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Binary file modified Assemblies/QuestionableEthicsEnhanced.dll
Binary file not shown.
7 changes: 5 additions & 2 deletions QEE/Things/BrainScanTemplate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,12 @@ public override Thing SplitOff(int count)
});
}

foreach (HediffInfo h in hediffInfos)
if (hediffInfos != null)
{
brainScan.hediffInfos.Add(h);
foreach (HediffInfo h in hediffInfos)
{
brainScan.hediffInfos.Add(h);
}
}

//Animal
Expand Down
7 changes: 5 additions & 2 deletions QEE/Things/GenomeSequence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,12 @@ public override Thing SplitOff(int count)
splitThingStack.traits.Add(new ExposedTraitEntry(traitEntry));
}

foreach(HediffInfo h in hediffInfos)
if (hediffInfos != null)
{
splitThingStack.hediffInfos.Add(h);
foreach (HediffInfo h in hediffInfos)
{
splitThingStack.hediffInfos.Add(h);
}
}

//Alien Compat.
Expand Down

0 comments on commit 4447f19

Please sign in to comment.