https://git.reactos.org/?p=reactos.git;a=commitdiff;h=edaeef94180e961a78c5a…
commit edaeef94180e961a78c5a5ddbb1c4e1e94473763
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Mon Nov 20 09:27:06 2023 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Nov 20 09:27:06 2023 +0900
[SHELL32] Fix exception on modifying deleted file type (#5996)
Based on KRosUser's filetypes.patch. Check NULL for pEntry.
CORE-19324
---
dll/win32/shell32/dialogs/filetypes.cpp | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/dll/win32/shell32/dialogs/filetypes.cpp
b/dll/win32/shell32/dialogs/filetypes.cpp
index 78e5f7322ad..ad394c8b1d3 100644
--- a/dll/win32/shell32/dialogs/filetypes.cpp
+++ b/dll/win32/shell32/dialogs/filetypes.cpp
@@ -1722,8 +1722,11 @@ FolderOptionsFileTypesDlg(
case IDC_FILETYPES_ADVANCED:
edittype.hwndLV = GetDlgItem(hwndDlg, IDC_FILETYPES_LISTVIEW);
edittype.pEntry = FileTypesDlg_GetEntry(edittype.hwndLV);
- DialogBoxParamW(shell32_hInstance, MAKEINTRESOURCEW(IDD_EDITTYPE),
- hwndDlg, EditTypeDlgProc, (LPARAM)&edittype);
+ if (edittype.pEntry)
+ {
+ DialogBoxParamW(shell32_hInstance,
MAKEINTRESOURCEW(IDD_EDITTYPE),
+ hwndDlg, EditTypeDlgProc,
(LPARAM)&edittype);
+ }
break;
}
break;
@@ -1745,8 +1748,11 @@ FolderOptionsFileTypesDlg(
case NM_DBLCLK:
edittype.hwndLV = GetDlgItem(hwndDlg, IDC_FILETYPES_LISTVIEW);
edittype.pEntry = FileTypesDlg_GetEntry(edittype.hwndLV);
- DialogBoxParamW(shell32_hInstance, MAKEINTRESOURCEW(IDD_EDITTYPE),
- hwndDlg, EditTypeDlgProc, (LPARAM)&edittype);
+ if (edittype.pEntry)
+ {
+ DialogBoxParamW(shell32_hInstance,
MAKEINTRESOURCEW(IDD_EDITTYPE),
+ hwndDlg, EditTypeDlgProc,
(LPARAM)&edittype);
+ }
break;
case LVN_DELETEALLITEMS: