From 41fe6409d36dc3735a888d8e527966ae094984a5 Mon Sep 17 00:00:00 2001 From: axatin <95587882+axatin@users.noreply.github.com> Date: Fri, 2 Aug 2024 20:47:35 +0200 Subject: [PATCH] Fix crash (#11194) --- CvGameCoreDLL_Expansion2/CvPlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CvGameCoreDLL_Expansion2/CvPlayer.cpp b/CvGameCoreDLL_Expansion2/CvPlayer.cpp index 508e326c27..3526db0129 100644 --- a/CvGameCoreDLL_Expansion2/CvPlayer.cpp +++ b/CvGameCoreDLL_Expansion2/CvPlayer.cpp @@ -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; }