fix for stopping a nullptr QTimer

This commit is contained in:
Stephen Birarda 2015-12-21 16:20:06 -07:00
parent 111a8caa3c
commit 8c6449a886
2 changed files with 5 additions and 3 deletions

View file

@ -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();

View file

@ -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() {