Skip to content

Commit 14993be

Browse files
committed
Added sanity checks
1 parent 4541eef commit 14993be

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/Battlescape/BattlescapeGame.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ void BattlescapeGame::checkForCasualties(BattleItem *murderweapon, BattleUnit *m
817817
}
818818
}
819819
}
820-
else if (!murderer->getStatistics()->duplicateEntry(STATUS_UNCONSCIOUS, victim->getId()))
820+
else if (murderer && !murderer->getStatistics()->duplicateEntry(STATUS_UNCONSCIOUS, victim->getId()))
821821
{
822822
murderer->getStatistics()->kills.push_back(new BattleUnitKills(killStatRank, killStatRace, killStatWeapon, killStatWeaponAmmo, victim->getFaction(), STATUS_UNCONSCIOUS, killStatMission, killStatTurn, victim->getFatalShotSide(), victim->getFatalShotBodyPart(), victim->getId() ));
823823
}

src/OpenXcom.2010.vcxproj.user

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
44
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\bin\$(Platform)\</LocalDebuggerWorkingDirectory>
5-
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
6-
<ShowAllFiles>true</ShowAllFiles>
7-
<LocalDebuggerCommandArguments>-data "$(ProjectDir)..\bin"</LocalDebuggerCommandArguments>
5+
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
6+
<ShowAllFiles>true</ShowAllFiles>
7+
<LocalDebuggerCommandArguments>-data "$(ProjectDir)..\bin"</LocalDebuggerCommandArguments>
88
</PropertyGroup>
99
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
1010
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\bin\$(Platform)\</LocalDebuggerWorkingDirectory>
11-
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
12-
<ShowAllFiles>true</ShowAllFiles>
13-
<LocalDebuggerCommandArguments>-data "$(ProjectDir)..\bin"</LocalDebuggerCommandArguments>
11+
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
12+
<ShowAllFiles>true</ShowAllFiles>
13+
<LocalDebuggerCommandArguments>-data "$(ProjectDir)..\bin"</LocalDebuggerCommandArguments>
1414
</PropertyGroup>
1515
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
1616
<LocalDebuggerWorkingDirectory>$(ProjectDir)..\bin\$(Platform)\</LocalDebuggerWorkingDirectory>

src/Savegame/SoldierDiary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ bool SoldierDiary::manageCommendations(Ruleset *rules)
488488
{
489489
continue;
490490
}
491-
else if (thisTime != lastTime)
491+
else if (thisTime != lastTime && (*j).first != "killsWithCriteriaCareer")
492492
{
493493
count = 1; // Reset.
494494
goToNextTime = false;

0 commit comments

Comments
 (0)