summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Pankow <brad@livio.io>2016-07-28 17:01:35 -0400
committerBrad Pankow <brad@livio.io>2016-07-28 17:01:35 -0400
commit4dfa65a35ee165176afe79b2e4f5a6aa4ce36ac4 (patch)
treeb6ccfa2412492468bd88b742bd5bb2bd7960794e
parent1fd05a8a5ce6b567d573e5933eea2aa1be1f6d6d (diff)
downloadsdl_core-4dfa65a35ee165176afe79b2e4f5a6aa4ce36ac4.tar.gz
Check return of command init before running it (CID 79987)
-rw-r--r--src/components/application_manager/src/application_manager_impl.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/application_manager/src/application_manager_impl.cc b/src/components/application_manager/src/application_manager_impl.cc
index 2aba14ec30..626cc4fc0e 100644
--- a/src/components/application_manager/src/application_manager_impl.cc
+++ b/src/components/application_manager/src/application_manager_impl.cc
@@ -2468,9 +2468,10 @@ void ApplicationManagerImpl::Handle(const impl::AudioData message) {
LOG4CXX_INFO_EXT(logger_, "Send data");
CommandSharedPtr command(MobileCommandFactory::CreateCommand(
on_audio_pass, commands::Command::ORIGIN_SDL));
- command->Init();
- command->Run();
- command->CleanUp();
+ if (command->Init()) {
+ command->Run();
+ command->CleanUp();
+ }
}
mobile_apis::Result::eType ApplicationManagerImpl::CheckPolicyPermissions(