diff --git a/source/simulation2/components/CCmpFootprint.cpp b/source/simulation2/components/CCmpFootprint.cpp index 1911428f15..e40c5bd38a 100644 --- a/source/simulation2/components/CCmpFootprint.cpp +++ b/source/simulation2/components/CCmpFootprint.cpp @@ -170,6 +170,9 @@ public: if (cmpSpawnedObstruction) { spawnedRadius = cmpSpawnedObstruction->GetSize(); + // Force a positive radius to avoid division by zero errors. + if (spawnedRadius == 0) + spawnedRadius = 1; spawnedTag = cmpSpawnedObstruction->GetObstruction(); }