summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Oleynik <aoleynik@luxoft.com>2015-09-07 17:16:31 +0300
committerAndrey Oleynik <aoleynik@luxoft.com>2015-10-02 15:16:37 +0300
commit39b44ad13b2dba34f9808d5802caf7f00f834280 (patch)
tree8e2e1f7ee6aad983784794f0cc0870b3072805fb
parent4d6cf970a2f6eef3b6c22d247eb37810fbe6e42d (diff)
downloadsmartdevicelink-39b44ad13b2dba34f9808d5802caf7f00f834280.tar.gz
Fixes core dump while sending ResetGlobalProperties
Due to response deletion by request controller there is possibility of using object members being destructed. Closes-bug: APPLINK-16029
-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 7472324ed..2e1483eff 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;