From 096e1e9a81e5d9ca93dfbf636d641e9948f60d92 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Tue, 15 Nov 2016 00:29:59 +0000 Subject: [PATCH] refs #804 Fixed Clang static analysis warnings. --- src/blacksound/soundgenerator.cpp | 12 +++++++++--- src/swiftguistandard/swiftguistd.cpp | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/blacksound/soundgenerator.cpp b/src/blacksound/soundgenerator.cpp index a5a457814..04a266f46 100644 --- a/src/blacksound/soundgenerator.cpp +++ b/src/blacksound/soundgenerator.cpp @@ -148,9 +148,15 @@ namespace BlackSound } else { - if (this->m_pushTimer) this->m_pushTimer->stop(); - this->m_pushTimer->disconnect(this); - if (this->m_playMode == CNotificationSounds::SingleWithAutomaticDeletion) this->stop(); + if (this->m_pushTimer) + { + this->m_pushTimer->stop(); + this->m_pushTimer->disconnect(this); + } + if (this->m_playMode == CNotificationSounds::SingleWithAutomaticDeletion) + { + this->stop(); + } } } diff --git a/src/swiftguistandard/swiftguistd.cpp b/src/swiftguistandard/swiftguistd.cpp index 9492d498b..371c66c3c 100644 --- a/src/swiftguistandard/swiftguistd.cpp +++ b/src/swiftguistandard/swiftguistd.cpp @@ -299,8 +299,8 @@ void SwiftGuiStd::setContextAvailability() sGui && this->isMyIdentifier(sGui->getIContextApplication()->registerApplication(getCurrentTimestampIdentifier())); } - this->m_contextNetworkAvailable = this->m_coreAvailable || sGui->getIContextNetwork()->isUsingImplementingObject(); - this->m_contextAudioAvailable = this->m_coreAvailable || sGui->getIContextAudio()->isUsingImplementingObject(); + this->m_contextNetworkAvailable = this->m_coreAvailable || (sGui && sGui->getIContextNetwork()->isUsingImplementingObject()); + this->m_contextAudioAvailable = this->m_coreAvailable || (sGui && sGui->getIContextAudio()->isUsingImplementingObject()); // react to a change in core's availability if (this->m_coreAvailable != corePreviouslyAvailable)