From 302f815321792cef41d7d465028442d51964e561 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 8 Jan 2023 11:33:29 +0100 Subject: [PATCH] Ported: [3.x] GLTF: Fix wrong error macro used in a few spots - aaronfranke https://github.com/godotengine/godot/commit/ca898a7b77660a1b7398e7144812bf25e9e2f4f0 --- .../gltf/extensions/gltf_document_extension.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/editor_modules/gltf/extensions/gltf_document_extension.cpp b/editor_modules/gltf/extensions/gltf_document_extension.cpp index 87b655a75..9ac2559ac 100644 --- a/editor_modules/gltf/extensions/gltf_document_extension.cpp +++ b/editor_modules/gltf/extensions/gltf_document_extension.cpp @@ -139,8 +139,8 @@ Error GLTFDocumentExtension::export_preflight(Ref p_state, Node *p_ro } void GLTFDocumentExtension::convert_scene_node(Ref p_state, Ref p_gltf_node, Node *p_scene_node) { - ERR_FAIL_NULL(p_state.is_null()); - ERR_FAIL_NULL(p_gltf_node.is_null()); + ERR_FAIL_COND(p_state.is_null()); + ERR_FAIL_COND(p_gltf_node.is_null()); ERR_FAIL_NULL(p_scene_node); ScriptInstance *si = get_script_instance(); if (!si) { @@ -150,8 +150,8 @@ void GLTFDocumentExtension::convert_scene_node(Ref p_state, Ref p_state, Ref p_gltf_node, Dictionary &r_dict, Node *p_node) { - ERR_FAIL_NULL_V(p_state.is_null(), ERR_INVALID_PARAMETER); - ERR_FAIL_NULL_V(p_gltf_node.is_null(), ERR_INVALID_PARAMETER); + ERR_FAIL_COND(p_state.is_null(), ERR_INVALID_PARAMETER); + ERR_FAIL_COND(p_gltf_node.is_null(), ERR_INVALID_PARAMETER); ERR_FAIL_NULL_V(p_node, ERR_INVALID_PARAMETER); ScriptInstance *si = get_script_instance(); if (!si) { @@ -162,7 +162,7 @@ Error GLTFDocumentExtension::export_node(Ref p_state, Ref p } Error GLTFDocumentExtension::export_post(Ref p_state) { - ERR_FAIL_NULL_V(p_state.is_null(), ERR_INVALID_PARAMETER); + ERR_FAIL_COND_V(p_state.is_null(), ERR_INVALID_PARAMETER); ScriptInstance *si = get_script_instance(); if (!si) { return Error::OK;