https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a842a92260f16e4b296e3…
commit a842a92260f16e4b296e3c569ac43603408edb8f
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Jan 1 10:12:51 2024 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Jan 1 10:12:51 2024 +0900
[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.
---
base/applications/rapps/gui.cpp | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp
index 0c81f789bd1..3283c71ef79 100644
--- a/base/applications/rapps/gui.cpp
+++ b/base/applications/rapps/gui.cpp
@@ -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;
}