summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-04-03 11:55:01 +0200
committerGitHub <noreply@github.com>2018-04-03 11:55:01 +0200
commita10be201de2aac2a239568970e02dce04261bc3b (patch)
tree7c3bd8d659b7c1553b9a8f770f0d6d794921bbb7 /scene
parent5dc514acedc136d596085bfd6454947bcf36bfc3 (diff)
parenta492d229529018f0277f75aa7b99661b5dd40420 (diff)
Merge pull request #17902 from Noshyaar/outline
Mesh: fix crash when creating mesh outline from QuadMesh
Diffstat (limited to 'scene')
-rw-r--r--scene/resources/mesh.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index 949ba12a4c..b832ea1239 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -315,6 +315,8 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
}
}
+ ERR_FAIL_COND_V(arrays.size() != ARRAY_MAX, Ref<ArrayMesh>());
+
{
PoolVector<int>::Write ir;
PoolVector<int> indices = arrays[ARRAY_INDEX];