diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-09-27 15:13:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-27 15:13:17 +0200 |
commit | 41228343fed38537d5a58f1222012512a5e7758c (patch) | |
tree | 9cba2b4e74e30379d5925af8a2875731e8e50aeb | |
parent | 8d2deddc72b14fa3daa1dcb170c3b3d9a6adf26f (diff) | |
parent | ab280de765131d7723b4d3f1a3066d26d63d79a7 (diff) |
Merge pull request #53127 from timothyqiu/index-mod
-rw-r--r-- | scene/resources/surface_tool.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index d5e370568d..a8cd872408 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -1176,6 +1176,7 @@ Vector<int> SurfaceTool::generate_lod(float p_threshold, int p_target_index_coun ERR_FAIL_COND_V(simplify_func == nullptr, lod); ERR_FAIL_COND_V(vertex_array.size() == 0, lod); ERR_FAIL_COND_V(index_array.size() == 0, lod); + ERR_FAIL_COND_V(index_array.size() % 3 != 0, lod); lod.resize(index_array.size()); LocalVector<float> vertices; //uses floats |