Merge pull request #16533 from ctrlaltdavid/DEV-2800

DEV-2800: Fix crash in Stats.forceUpdateStats() at start-up
This commit is contained in:
Shannon Romano 2019-11-25 09:04:30 -08:00 committed by GitHub
commit 85cea1fcb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -251,7 +251,7 @@ void Stats::updateStats(bool force) {
SharedNodePointer audioMixerNode = nodeList->soloNodeOfType(NodeType::AudioMixer);
auto audioClient = DependencyManager::get<AudioClient>().data();
if (audioMixerNode || force) {
if (audioMixerNode) {
STAT_UPDATE(audioMixerKbps, (int)roundf(audioMixerNode->getInboundKbps() +
audioMixerNode->getOutboundKbps()));
STAT_UPDATE(audioMixerPps, audioMixerNode->getInboundPPS() +