@@ -568,9 +568,10 @@ void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
569 Q_UNUSED(parent)
569 Q_UNUSED(parent)
571+ ApplicationInfoInterface *app = m_appManager->get(row);
571 int appIndex = -1;
572 int appIndex = -1;
572 for (int i = 0; i < m_list.count(); ++i) {
573 for (int i = 0; i < m_list.count(); ++i) {
573− if (m_list.at(i)->appId() == m_appManager->get(row)->appId()) {
574+ if (m_list.at(i)->appId() == app->appId()) {
574 appIndex = i;
575 appIndex = i;
@@ -581,6 +582,8 @@ void LauncherModel::applicationRemoved(const QModelIndex &parent, int row)
585+ disconnect(app, &ApplicationInfoInterface::surfaceCountChanged, this, &LauncherModel::applicationSurfaceCountChanged);
584 LauncherItem * item = m_list.at(appIndex);
587 LauncherItem * item = m_list.at(appIndex);
585 item->setRunning(false);
588 item->setRunning(false);