summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAGaliuzov <AGaliuzov@luxoft.com>2015-10-02 17:04:34 +0300
committerAGaliuzov <AGaliuzov@luxoft.com>2015-10-02 17:04:34 +0300
commit428ab669283c486cb628d922e0fb0e2e4ef00da4 (patch)
tree8e2e1f7ee6aad983784794f0cc0870b3072805fb
parent4d6cf970a2f6eef3b6c22d247eb37810fbe6e42d (diff)
parent39b44ad13b2dba34f9808d5802caf7f00f834280 (diff)
downloadsdl_core-428ab669283c486cb628d922e0fb0e2e4ef00da4.tar.gz
Merge pull request #224 from LuxoftSDL/hotfix/Crash_on_ResetGlobalProperties
Fixes core dump while sending ResetGlobalProperties
-rw-r--r--src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc b/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc
index 7472324ed9..2e1483eff6 100644
--- a/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc
+++ b/src/components/application_manager/src/commands/mobile/reset_global_properties_request.cc
@@ -239,6 +239,9 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
LOG4CXX_AUTO_TRACE(logger_);
const smart_objects::SmartObject& message = event.smart_object();
+ ApplicationSharedPtr application =
+ ApplicationManagerImpl::instance()->application(connection_key());
+
switch (event.id()) {
case hmi_apis::FunctionID::UI_SetGlobalProperties: {
LOG4CXX_INFO(logger_, "Received UI_SetGlobalProperties event");
@@ -288,9 +291,6 @@ void ResetGlobalPropertiesRequest::on_event(const event_engine::Event& event) {
SendResponse(result, static_cast<mobile_apis::Result::eType>(result_code),
return_info, &(message[strings::msg_params]));
- ApplicationSharedPtr application =
- ApplicationManagerImpl::instance()->application(connection_key());
-
if (!application) {
LOG4CXX_DEBUG(logger_, "NULL pointer");
return;