mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
fix for stopping a nullptr QTimer
This commit is contained in:
parent
111a8caa3c
commit
8c6449a886
2 changed files with 5 additions and 3 deletions
|
@ -94,7 +94,7 @@ NodeList::NodeList(char newOwnerType, unsigned short socketListenPort, unsigned
|
|||
_keepAlivePingTimer.setInterval(KEEPALIVE_PING_INTERVAL_MS);
|
||||
connect(&_keepAlivePingTimer, &QTimer::timeout, this, &NodeList::sendKeepAlivePings);
|
||||
connect(&_domainHandler, SIGNAL(connectedToDomain(QString)), &_keepAlivePingTimer, SLOT(start()));
|
||||
connect(&_domainHandler, &DomainHandler::disconnectedFromDomain, this, &NodeList::stopKeepalivePingTimer);
|
||||
connect(&_domainHandler, &DomainHandler::disconnectedFromDomain, &_keepAlivePingTimer, &QTimer::stop);
|
||||
|
||||
// we definitely want STUN to update our public socket, so call the LNL to kick that off
|
||||
startSTUNPublicSocketUpdate();
|
||||
|
|
|
@ -122,8 +122,10 @@ void ThreadedAssignment::startSendingStats() {
|
|||
}
|
||||
|
||||
void ThreadedAssignment::stopSendingStats() {
|
||||
// stop sending stats, we just disconnected from domain
|
||||
_statsTimer->stop();
|
||||
if (_statsTimer) {
|
||||
// stop sending stats, we just disconnected from domain
|
||||
_statsTimer->stop();
|
||||
}
|
||||
}
|
||||
|
||||
void ThreadedAssignment::checkInWithDomainServerOrExit() {
|
||||
|
|
Loading…
Reference in a new issue