mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 15:13:41 +02:00
add more guards against out of bounds
This commit is contained in:
parent
ff54334fe1
commit
9e7f60e6a3
1 changed files with 5 additions and 0 deletions
|
@ -2360,6 +2360,11 @@ void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool tran
|
|||
|
||||
qint64 offset = 0;
|
||||
|
||||
// guard against partially loaded meshes
|
||||
if (partIndex >= networkMesh.parts.size() || partIndex >= mesh.parts.size()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const NetworkMeshPart& networkPart = networkMesh.parts.at(partIndex);
|
||||
const FBXMeshPart& part = mesh.parts.at(partIndex);
|
||||
model::MaterialPointer material = part._material;
|
||||
|
|
Loading…
Reference in a new issue