Merge pull request #54321 from V-Sekai/import-scene-crash

This commit is contained in:
Rémi Verschelde 2021-10-27 22:25:25 +02:00 committed by GitHub
commit 157cba3933
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -342,6 +342,7 @@ static String _fixstr(const String &p_what, const String &p_str) {
static void _pre_gen_shape_list(Ref<ImporterMesh> &mesh, Vector<Ref<Shape3D>> &r_shape_list, bool p_convex) {
ERR_FAIL_NULL_MSG(mesh, "Cannot generate shape list with null mesh value");
ERR_FAIL_NULL_MSG(mesh->get_mesh(), "Cannot generate shape list with null mesh value");
if (!p_convex) {
Ref<Shape3D> shape = mesh->create_trimesh_shape();
r_shape_list.push_back(shape);