Skip to content

Commit

Permalink
Update Hooks.Grinding.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
chaserli committed Nov 29, 2024
1 parent 2af0a77 commit b629311
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Ext/Building/Hooks.Grinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ DEFINE_HOOK(0x4D4B43, FootClass_Mission_Capture_ForbidUnintended, 0x6)
GET(InfantryClass*, pThis, EDI);
enum { LosesDestination = 0x4D4BD1 };

if (!pThis || pThis->Target)
return 0;

auto pBld = specific_cast<BuildingClass*>(pThis->Destination);
if (!pThis || !pBld || pThis->Target)
if (!pBld)
return 0;

if (pThis->Type->Engineer)
Expand Down

0 comments on commit b629311

Please sign in to comment.