diff options
author | Artem Nosach <ANosach@luxoft.com> | 2016-02-19 10:39:49 +0200 |
---|---|---|
committer | Artem Nosach <ANosach@luxoft.com> | 2016-02-19 10:39:49 +0200 |
commit | a4c2702fdfb5cac4cca4db9cb6dc60e357f2daae (patch) | |
tree | 9451c99c22483e0632e36dde9fe859f571ee3bc6 | |
parent | 1cce3f4b6cb339df9338d73cda78e86361e3a9a6 (diff) | |
parent | 40fdc8fc9b98f9adf00effbea9a8e5e499842451 (diff) | |
download | smartdevicelink-a4c2702fdfb5cac4cca4db9cb6dc60e357f2daae.tar.gz |
Merge pull request #388 from LuxoftSDL/hotfix/SDL_core_dump_observed_with_iPhone
Check validity of pointer to application, posible fix for PASA core crash
-rw-r--r-- | src/components/application_manager/src/message_helper/message_helper.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/application_manager/src/message_helper/message_helper.cc b/src/components/application_manager/src/message_helper/message_helper.cc index 3767f99c4..2975d70cf 100644 --- a/src/components/application_manager/src/message_helper/message_helper.cc +++ b/src/components/application_manager/src/message_helper/message_helper.cc @@ -1680,9 +1680,14 @@ void MessageHelper::GetDeviceInfoForApp(uint32_t connection_key, return; } - device_info->device_handle = - ApplicationManagerImpl::instance()->application(connection_key)->device(); + ApplicationSharedPtr app = ApplicationManagerImpl::instance()->application( + connection_key); + if (!app.valid()) { + LOG4CXX_ERROR(logger_, "Invalid application with connection_key " << connection_key); + return; + } + device_info->device_handle = app->device(); GetDeviceInfoForHandle(device_info->device_handle, device_info); } |