[Issue#] N_SE-36044
[Problem] Unexpected crash is occurred when install-location set
to prefer-external
[Cause] In case of SD card isn't ready, exception is thrown.
During catch and handle exception, callback touch un-initialized
value.
[Solution] Add condition to prevent un-initialize value
[SCMRequest] N/A
Change-Id: I68eb0ccd5d7ee8737e2e89eba563a8d1ccc0342f
void WidgetInstallToExt::postInstallation(bool status)
{
LogDebug("WidgetInstallToExt::postInstallation()");
void WidgetInstallToExt::postInstallation(bool status)
{
LogDebug("WidgetInstallToExt::postInstallation()");
- if (status) {
- m_handle->interface.post_install(m_appId.c_str(),
- APP2EXT_STATUS_SUCCESS);
- } else {
- m_handle->interface.post_install(m_appId.c_str(),
- APP2EXT_STATUS_FAILED);
+ if (NULL != m_handle) {
+ if (status) {
+ m_handle->interface.post_install(m_appId.c_str(),
+ APP2EXT_STATUS_SUCCESS);
+ } else {
+ m_handle->interface.post_install(m_appId.c_str(),
+ APP2EXT_STATUS_FAILED);
+ }
void WidgetInstallToExt::postUpgrade(bool status)
{
LogDebug("WidgetInstallToExt::postUpgrade()");
void WidgetInstallToExt::postUpgrade(bool status)
{
LogDebug("WidgetInstallToExt::postUpgrade()");
- Assert(m_handle);
-
- if (status) {
- m_handle->interface.post_upgrade(m_appId.c_str(),
- APP2EXT_STATUS_SUCCESS);
- } else {
- m_handle->interface.post_upgrade(m_appId.c_str(),
- APP2EXT_STATUS_FAILED);
+ if (NULL != m_handle) {
+ if (status) {
+ m_handle->interface.post_upgrade(m_appId.c_str(),
+ APP2EXT_STATUS_SUCCESS);
+ } else {
+ m_handle->interface.post_upgrade(m_appId.c_str(),
+ APP2EXT_STATUS_FAILED);
+ }