When the app_info argument is nullptr, calling the enable_shared_from_this()
makes a crash issue. To prevent invalid access, this patch adds
the nullptr check before calling the enable_shared_from_this().
Change-Id: I6ec4acc979eb794c9d07b259658134ad793744a7
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
}
void LaunchContext::SetAppInfo(appinfo_h app_info) {
- app_info_ = static_cast<AppInfo*>(app_info)->shared_from_this();
+ if (app_info == nullptr)
+ app_info_.reset();
+ else
+ app_info_ = static_cast<AppInfo*>(app_info)->shared_from_this();
}
void LaunchContext::SetAppStatus(app_status_h app_status) {