Merge pull request #52856 from e8newallm/52816
Corrected GLTFDocument::save_scene from processing a nullptr
This commit is contained in:
commit
65e91798a5
1 changed files with 2 additions and 0 deletions
|
@ -6744,6 +6744,8 @@ Error GLTFDocument::_serialize_file(Ref<GLTFState> state, const String p_path) {
|
||||||
Error GLTFDocument::save_scene(Node *p_node, const String &p_path,
|
Error GLTFDocument::save_scene(Node *p_node, const String &p_path,
|
||||||
const String &p_src_path, uint32_t p_flags,
|
const String &p_src_path, uint32_t p_flags,
|
||||||
float p_bake_fps, Ref<GLTFState> r_state) {
|
float p_bake_fps, Ref<GLTFState> r_state) {
|
||||||
|
ERR_FAIL_NULL_V(p_node, ERR_INVALID_PARAMETER);
|
||||||
|
|
||||||
Ref<GLTFDocument> gltf_document;
|
Ref<GLTFDocument> gltf_document;
|
||||||
gltf_document.instantiate();
|
gltf_document.instantiate();
|
||||||
if (r_state == Ref<GLTFState>()) {
|
if (r_state == Ref<GLTFState>()) {
|
||||||
|
|
Loading…
Reference in a new issue