summaryrefslogtreecommitdiff
path: root/src/components/application_manager/src
diff options
context:
space:
mode:
authorAlexander Kutsan <akutsan@luxoft.com>2017-09-06 00:32:09 +0300
committerAlexander Kutsan <akutsan@luxoft.com>2017-09-06 00:34:59 +0300
commit9577de771bb7d5e9b710ba92dd4d8355e18c95b9 (patch)
tree65305b3adfc5fb03b71db5cfb5525500a60c800e /src/components/application_manager/src
parent8a20672a51f711ee060bf918a31de39873d22c0d (diff)
downloadsdl_core-9577de771bb7d5e9b710ba92dd4d8355e18c95b9.tar.gz
Add missed DCHECKs
Diffstat (limited to 'src/components/application_manager/src')
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc1
-rw-r--r--src/components/application_manager/src/core_service.cc3
-rw-r--r--src/components/application_manager/src/policies/policy_handler.cc1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 19e255647a..d6c2aa6d7a 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -4053,6 +4053,7 @@ struct TakeDeviceHandle {
public:
TakeDeviceHandle(const ApplicationManager& app_mngr) : app_mngr_(app_mngr) {}
std::string operator()(ApplicationSharedPtr& app) {
+ DCHECK_OR_RETURN(app, "");
return MessageHelper::GetDeviceMacAddressForHandle(app->device(),
app_mngr_);
}
diff --git a/src/components/application_manager/src/core_service.cc b/src/components/application_manager/src/core_service.cc
index 40d8a07a1c..2a96502cde 100644
--- a/src/components/application_manager/src/core_service.cc
+++ b/src/components/application_manager/src/core_service.cc
@@ -96,6 +96,7 @@ bool CoreService::CheckModule(const ApplicationId& app_id,
bool CoreService::IsRemoteControlApplication(ApplicationSharedPtr app) const {
#ifdef SDL_REMOTE_CONTROL
+ DCHECK_OR_RETURN(app, false);
return application_manager_.GetPolicyHandler().CheckHMIType(
app->policy_app_id(),
mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
@@ -154,6 +155,7 @@ std::vector<ApplicationSharedPtr> CoreService::GetApplications(
void CoreService::ChangeNotifyHMILevel(ApplicationSharedPtr app,
mobile_apis::HMILevel::eType level) {
+ DCHECK_OR_RETURN_VOID(app);
application_manager_.ChangeAppsHMILevel(app->app_id(), level);
}
@@ -163,6 +165,7 @@ const smart_objects::SmartObject* CoreService::GetRCCapabilities() const {
void CoreService::NotifyHMIAboutHMILevel(ApplicationSharedPtr app,
mobile_apis::HMILevel::eType level) {
+ DCHECK_OR_RETURN_VOID(app);
if (app->hmi_level() != mobile_apis::HMILevel::eType::HMI_FULL) {
MessageHelper::SendActivateAppToHMI(
app->app_id(),
diff --git a/src/components/application_manager/src/policies/policy_handler.cc b/src/components/application_manager/src/policies/policy_handler.cc
index 0b365fc4e0..ad21f533a1 100644
--- a/src/components/application_manager/src/policies/policy_handler.cc
+++ b/src/components/application_manager/src/policies/policy_handler.cc
@@ -1964,6 +1964,7 @@ std::vector<std::string> PolicyHandler::GetDevicesIds(
void PolicyHandler::UpdateHMILevel(ApplicationSharedPtr app,
mobile_apis::HMILevel::eType level) {
LOG4CXX_AUTO_TRACE(logger_);
+ DCHECK_OR_RETURN_VOID(app);
if (app->hmi_level() == mobile_apis::HMILevel::HMI_NONE) {
// If default is FULL, send request to HMI. Notification to mobile will be
// sent on response receiving.