mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
Give a fatal error when no mesh data is loaded
- Part of having mesh data in an IQM includes joints. If a model doesn't have any mesh data to it, it won't have joints, and those are necessary. Poses are a different story however.
This commit is contained in:
parent
5f0bf8eda6
commit
3c9a1ffe5e
1 changed files with 3 additions and 0 deletions
|
@ -59,6 +59,9 @@ bool IQMModel::Load(const char* path, int lumpnum, const char* buffer, int lengt
|
|||
uint32_t num_extensions = reader.ReadUInt32();
|
||||
uint32_t ofs_extensions = reader.ReadUInt32();
|
||||
|
||||
if (num_meshes <= 0)
|
||||
I_FatalError("Invalid model: \"%s%s\", no mesh data is unsupported", path, fileSystem.GetLongName(mLumpNum));
|
||||
|
||||
if (num_text == 0)
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue