Merge pull request #47718 from lyuma/fbx_empty_crash_3.3

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

View file

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