From 85f3d3d8e97f133f3eb4f32b3eac1c9bdfe769ad Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee <emmanuel.lepage@savoirfairelinux.com> Date: Wed, 18 Mar 2015 18:52:23 -0400 Subject: [PATCH] Make clang scan-build happy --- src/accountmodel.cpp | 4 +++- src/call.cpp | 5 ++++- src/private/videorenderermanager.cpp | 2 ++ src/profilemodel.cpp | 3 +++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/accountmodel.cpp b/src/accountmodel.cpp index bce355cd..c2395b4e 100644 --- a/src/accountmodel.cpp +++ b/src/accountmodel.cpp @@ -206,7 +206,9 @@ void AccountModelPrivate::slotAccountChanged(const QString& account,const QStrin if (status != "OK") //Do not pollute the log qDebug() << "Account" << account << "status changed to" << status; } - a->d_ptr->m_LastSipRegistrationStatus = status; + + if (a) + a->d_ptr->m_LastSipRegistrationStatus = status; ConfigurationManagerInterface& configurationManager = DBus::ConfigurationManager::instance(); diff --git a/src/call.cpp b/src/call.cpp index 2ef68b52..001b441a 100644 --- a/src/call.cpp +++ b/src/call.cpp @@ -869,7 +869,10 @@ void Call::setDialNumber(const ContactMethod* number) } if (d_ptr->m_pDialNumber && number) d_ptr->m_pDialNumber->setUri(number->uri()); - emit dialNumberChanged(d_ptr->m_pDialNumber->uri()); + + if (d_ptr->m_pDialNumber) + emit dialNumberChanged(d_ptr->m_pDialNumber->uri()); + emit changed(); emit changed(this); } diff --git a/src/private/videorenderermanager.cpp b/src/private/videorenderermanager.cpp index 2e7c51c8..f30afb69 100644 --- a/src/private/videorenderermanager.cpp +++ b/src/private/videorenderermanager.cpp @@ -187,10 +187,12 @@ void VideoRendererManagerPrivate::startedDecoding(const QString& id, const QStri } else { m_lRenderers[rid]->setSize(res); +#ifdef ENABLE_LIBWRAP DBus::VideoManager::instance().registerSinkTarget(id, [this, id, width, height] (const unsigned char* frame) { static_cast<Video::DirectRenderer*>(m_lRenderers[id.toLatin1()])->onNewFrame( QByteArray::fromRawData(reinterpret_cast<const char *>(frame), width*height)); }); +#endif #if !defined(Q_OS_DARWIN) static_cast<Video::ShmRenderer*>(m_lRenderers[rid])->setShmPath(shmPath); diff --git a/src/profilemodel.cpp b/src/profilemodel.cpp index a35b956d..716210ce 100644 --- a/src/profilemodel.cpp +++ b/src/profilemodel.cpp @@ -718,6 +718,9 @@ bool ProfileModel::dropMimeData(const QMimeData *data, Qt::DropAction action, in destIdx = row; } + if (!newProfile) + return false; + Node* accountProfile = d_ptr->m_pProfileBackend->m_pEditor->m_hProfileByAccountId[accountId]; for (Node* acc : accountProfile->children) { if(acc->account->id() == accountId) { -- GitLab