summaryrefslogtreecommitdiff
path: root/scene/resources/curve.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2018-04-01 22:06:47 +0700
committerPoommetee Ketson <poommetee@protonmail.com>2018-04-01 22:06:47 +0700
commita492d229529018f0277f75aa7b99661b5dd40420 (patch)
treeca8d018d9671eba4fc1acd0ecad280637e8f4166 /scene/resources/curve.cpp
parentd2eb731878a4d660dd4a6babaea5967183b8f324 (diff)
Mesh: fix crash when creating mesh outline from QuadMesh
Since create_outline can only make outline for PRIMITIVE_TRIANGLES, when QuadMesh (which is PRIMITIVE_TRIANGLE_FAN) is used to create outline, will leave `arrays` empty, and crash when it is being indexed for "indices" subarray. This PR shows error when there's only one surface and it is not TRIANGLES. Also prevent the crash if it has more than one surface and none of them are TRIANGLES (and any other cases that could leave `arrays` empty) by checking the size of `arrays` == 8 before indexing it, since the method seems to expect `arrays` to be of that size.
Diffstat (limited to 'scene/resources/curve.cpp')
0 files changed, 0 insertions, 0 deletions