mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +02:00
fix crash in Model::deleteGeometry when _rig is not initialized
This commit is contained in:
parent
b9a0d0b843
commit
eefe26d96a
1 changed files with 5 additions and 3 deletions
|
@ -1099,10 +1099,12 @@ void Model::setGeometry(const QSharedPointer<NetworkGeometry>& newGeometry) {
|
||||||
|
|
||||||
void Model::deleteGeometry() {
|
void Model::deleteGeometry() {
|
||||||
_blendedVertexBuffers.clear();
|
_blendedVertexBuffers.clear();
|
||||||
_rig->clearJointStates();
|
|
||||||
_meshStates.clear();
|
_meshStates.clear();
|
||||||
_rig->deleteAnimations();
|
if (_rig) {
|
||||||
_rig->destroyAnimGraph();
|
_rig->clearJointStates();
|
||||||
|
_rig->deleteAnimations();
|
||||||
|
_rig->destroyAnimGraph();
|
||||||
|
}
|
||||||
_blendedBlendshapeCoefficients.clear();
|
_blendedBlendshapeCoefficients.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue