diff --git a/lib/mapObjects/CGDwelling.cpp b/lib/mapObjects/CGDwelling.cpp index 4c8e473fb..983194342 100644 --- a/lib/mapObjects/CGDwelling.cpp +++ b/lib/mapObjects/CGDwelling.cpp @@ -536,7 +536,14 @@ void CGDwelling::serializeJsonOptions(JsonSerializeFormat & handler) const IOwnableObject * CGDwelling::asOwnable() const { - return this; + switch (ID.toEnum()) + { + case Obj::WAR_MACHINE_FACTORY: + case Obj::REFUGEE_CAMP: + return nullptr; // can't be owned + default: + return this; + } } ResourceSet CGDwelling::dailyIncome() const