diff --git a/src/extensions/rules/rulesext.cpp b/src/extensions/rules/rulesext.cpp index 05220ebd9..b10fb90cc 100644 --- a/src/extensions/rules/rulesext.cpp +++ b/src/extensions/rules/rulesext.cpp @@ -614,7 +614,10 @@ void RulesClassExtension::Fixups(CCINIClass &ini) } - HouseTypeClass *housetype = HouseTypes[HOUSE_NOD]; + /** + * Ensure at least two HouseTypes are defined before performing this fixup case. + */ + HouseTypeClass *housetype = HouseTypes.Count() >= 2 ? HouseTypes[HOUSE_NOD] : nullptr; if (housetype) { /**