When the application information is loading again, AMD removes all
app infos. If the application information is reloaded, AMD will be crashed.
To avoid the crash issue, this patch changes the member variable of
the LaunchContext class to the shared_ptr.
Change-Id: If5e231eb570fcfd7980b24c45e2d81271ca6f359
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
}
void LaunchContext::SetAppInfo(appinfo_h app_info) {
- app_info_ = app_info;
+ app_info_ = static_cast<AppInfo*>(app_info)->shared_from_this();
}
void LaunchContext::SetAppStatus(app_status_h app_status) {
}
appinfo_h LaunchContext::GetAppInfo() const {
- return app_info_;
+ return app_info_.get();
}
app_status_h LaunchContext::GetAppStatus() const {
#include "lib/amd_comp_status.h"
#include "lib/amd_request.h"
+#include "lib/app_info/app_info.hh"
#include "lib/request/pending_item.hh"
#include "lib/request/reply_info.hh"
#include "lib/request/request.hh"
std::string app_id_;
bool new_instance_;
app_status_h app_status_ = nullptr;
- appinfo_h app_info_ = nullptr;
+ std::shared_ptr<AppInfo> app_info_;
bool allowed_background_ = false;
bool background_launch_ = false;
bool custom_effect_ = false;