Skip to content

Commit

Permalink
Fix crash (#11194)
Browse files Browse the repository at this point in the history
  • Loading branch information
axatin committed Aug 2, 2024
1 parent b9d74ab commit 41fe640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CvGameCoreDLL_Expansion2/CvPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16009,7 +16009,7 @@ bool CvPlayer::IsBuildBlockedByFeature(BuildTypes eBuild, FeatureTypes eFeature,
return false;
}

if (bTestEra && ((GetCurrentEra() + 1) >= GC.getTechInfo((TechTypes)GC.getBuildInfo(eBuild)->getTechPrereq())->GetEra()))
if (bTestEra && (TechTypes)GC.getBuildInfo(eBuild)->getTechPrereq() != NO_TECH && ((GetCurrentEra() + 1) >= GC.getTechInfo((TechTypes)GC.getBuildInfo(eBuild)->getTechPrereq())->GetEra()))
{
return false;
}
Expand Down

0 comments on commit 41fe640

Please sign in to comment.