[RAPPS] Don't ask for 'remote from registry' when no selection (#6267)

Based on KRosUser's RAPPS.patch.
JIRA issue: CORE-19409
If m_ApplicationView->GetFocusedItemData was NULL, then do not ask for removal.
This commit is contained in:
Katayama Hirofumi MZ 2024-01-01 10:12:51 +09:00 committed by GitHub
parent a70ce994f0
commit a842a92260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -270,14 +270,12 @@ CMainWindow::RemoveSelectedAppFromRegistry()
if (!szMsgText.LoadStringW(IDS_APP_REG_REMOVE) || !szMsgTitle.LoadStringW(IDS_INFORMATION))
return FALSE;
if (MessageBoxW(szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == IDYES)
{
CAppInfo *InstalledApp = (CAppInfo *)m_ApplicationView->GetFocusedItemData();
if (!InstalledApp)
return FALSE;
CAppInfo *InstalledApp = (CAppInfo *)m_ApplicationView->GetFocusedItemData();
if (!InstalledApp)
return FALSE;
if (MessageBoxW(szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == IDYES)
return m_Db->RemoveInstalledAppFromRegistry(InstalledApp);
}
return FALSE;
}