Fix crash on importing empty .fbx file
This commit is contained in:
parent
f7ae5442a6
commit
7d8e981262
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue