summaryrefslogtreecommitdiff
path: root/modules/gltf
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2021-10-13 02:55:09 -0700
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2021-10-13 02:55:09 -0700
commitb7ceec9d7bd2aba9debf8fa2504e7214f16d3d83 (patch)
treee7b471c24fc88a12b61896ad50bd0c1a30a2caf7 /modules/gltf
parentd742dcd3ceaa614d2688caed59ec0c75d4041985 (diff)
Error check GLTFDocumentExtensionConvertImporterMesh::import_post.
Diffstat (limited to 'modules/gltf')
-rw-r--r--modules/gltf/gltf_document_extension_convert_importer_mesh.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/gltf/gltf_document_extension_convert_importer_mesh.cpp b/modules/gltf/gltf_document_extension_convert_importer_mesh.cpp
index 78a98dfa3e..56c8f5ca27 100644
--- a/modules/gltf/gltf_document_extension_convert_importer_mesh.cpp
+++ b/modules/gltf/gltf_document_extension_convert_importer_mesh.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "gltf_document_extension_convert_importer_mesh.h"
+#include "core/error/error_macros.h"
#include "scene/3d/mesh_instance_3d.h"
#include "scene/resources/importer_mesh.h"
@@ -38,6 +39,8 @@ void GLTFDocumentExtensionConvertImporterMesh::_bind_methods() {
}
Error GLTFDocumentExtensionConvertImporterMesh::import_post(Ref<GLTFDocument> p_document, Node *p_node) {
+ ERR_FAIL_NULL_V(p_document, ERR_INVALID_PARAMETER);
+ ERR_FAIL_NULL_V(p_node, ERR_INVALID_PARAMETER);
List<Node *> queue;
queue.push_back(p_node);
List<Node *> delete_queue;