mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #8701 from ZappoMan/getShapeKeyCrashFix
add guards to getShapeKey
This commit is contained in:
commit
7ef8e53d03
1 changed files with 6 additions and 1 deletions
|
@ -397,7 +397,12 @@ ItemKey ModelMeshPartPayload::getKey() const {
|
|||
}
|
||||
|
||||
ShapeKey ModelMeshPartPayload::getShapeKey() const {
|
||||
assert(_model->isLoaded());
|
||||
|
||||
// guard against partially loaded meshes
|
||||
if (!_model || !_model->isLoaded() || !_model->getGeometry()) {
|
||||
return ShapeKey::Builder::invalid();
|
||||
}
|
||||
|
||||
const FBXGeometry& geometry = _model->getFBXGeometry();
|
||||
const auto& networkMeshes = _model->getGeometry()->getMeshes();
|
||||
|
||||
|
|
Loading…
Reference in a new issue