From 7f656a4616976f7d9549d3ea75035d95e00fbe75 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 26 Jan 2025 17:02:23 +0200 Subject: [PATCH] Make sure ico sphere's subdivisions is at least 1 --- source/builders/sphere.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/builders/sphere.cpp b/source/builders/sphere.cpp index 7873d3a2..d2b2eec2 100644 --- a/source/builders/sphere.cpp +++ b/source/builders/sphere.cpp @@ -127,6 +127,9 @@ IcoSphereBuilder::IcoSphereBuilder(float r, unsigned s): radius(r), subdivision(s) { + if(subdivision<1) + subdivision = 1; + if(base_edges[0]==base_edges[1]) initialize_edges(); } -- 2.45.2