fix: AM crashed when call update method but application can't found

Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
ComixHe 2023-09-01 17:48:34 +08:00 committed by Comix
parent 70c7b92e0e
commit 68996388b1

View File

@ -298,7 +298,9 @@ void ApplicationManager1Service::UpdateApplicationInfo(const QStringList &appIdL
[&appId](const QSharedPointer<ApplicationService> &app) { return appId == app->id(); }); [&appId](const QSharedPointer<ApplicationService> &app) { return appId == app->id(); });
if (err == DesktopErrorCode::NotFound) { if (err == DesktopErrorCode::NotFound) {
removeOneApplication(destApp.key()); if (destApp != m_applicationList.cend()) {
removeOneApplication(destApp.key());
}
continue; continue;
} }