https://git.reactos.org/?p=reactos.git;a=commitdiff;h=579f5012156b23510b15cd0633c9c84381414f9e

commit 579f5012156b23510b15cd0633c9c84381414f9e
Author:     Kyle Katarn <[email protected]>
AuthorDate: Tue Sep 15 22:50:12 2020 +0200
Commit:     GitHub <[email protected]>
CommitDate: Tue Sep 15 22:50:12 2020 +0200

    [RAPPS] Fix of unhandled exception when trying to modify/uninstall without 
selection (#3185)
    
    CORE-17279
---
 base/applications/rapps/gui.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/base/applications/rapps/gui.cpp b/base/applications/rapps/gui.cpp
index fb414504fc7..ed0689aac2a 100644
--- a/base/applications/rapps/gui.cpp
+++ b/base/applications/rapps/gui.cpp
@@ -278,6 +278,9 @@ BOOL CMainWindow::RemoveSelectedAppFromRegistry()
     if (MessageBoxW(szMsgText, szMsgTitle, MB_YESNO | MB_ICONQUESTION) == 
IDYES)
     {
         CInstalledApplicationInfo *InstalledApp = (CInstalledApplicationInfo 
*)m_ApplicationView->GetFocusedItemData();
+        if (!InstalledApp)
+            return FALSE;
+        
         LSTATUS Result = InstalledApp->RemoveFromRegistry();
         if (Result != ERROR_SUCCESS)
         {
@@ -299,6 +302,8 @@ BOOL CMainWindow::UninstallSelectedApp(BOOL bModify)
         return FALSE;
 
     CInstalledApplicationInfo *InstalledApp = (CInstalledApplicationInfo 
*)m_ApplicationView->GetFocusedItemData();
+    if (!InstalledApp)
+        return FALSE;
 
     return InstalledApp->UninstallApplication(bModify);
 }

Reply via email to