Merge pull request #47717 from lyuma/fbx_empty_crash

Fix crash on importing empty .fbx file
This commit is contained in:
Rémi Verschelde 2021-04-08 13:02:05 +02:00 committed by GitHub
commit fe6f226d26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,6 +104,9 @@ Node3D *EditorSceneImporterFBX::import_scene(const String &p_path, uint32_t p_fl
bool is_binary = false;
data.resize(f->get_len());
ERR_FAIL_COND_V(data.size() < 64, NULL);
f->get_buffer(data.ptrw(), data.size());
PackedByteArray fbx_header;
fbx_header.resize(64);