mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 21:12:53 +02:00
protect the agent from null timers in avatar stop
This commit is contained in:
parent
bca00db4a8
commit
229e73f88c
1 changed files with 11 additions and 4 deletions
|
@ -226,10 +226,17 @@ void Agent::setIsAvatar(bool isAvatar) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_isAvatar) {
|
if (!_isAvatar) {
|
||||||
delete _avatarIdentityTimer;
|
if (_avatarIdentityTimer) {
|
||||||
_avatarIdentityTimer = NULL;
|
_avatarIdentityTimer->stop();
|
||||||
delete _avatarBillboardTimer;
|
delete _avatarIdentityTimer;
|
||||||
_avatarBillboardTimer = NULL;
|
_avatarIdentityTimer = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_avatarBillboardTimer) {
|
||||||
|
_avatarIdentityTimer->stop();
|
||||||
|
delete _avatarIdentityTimer;
|
||||||
|
_avatarBillboardTimer = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue