https://git.reactos.org/?p=reactos.git;a=commitdiff;h=460a01b167066f755e5ae0...
commit 460a01b167066f755e5ae06ac9fbd913f73065d2 Author: Mark Jansen mark.jansen@reactos.org AuthorDate: Mon Feb 13 23:19:55 2023 +0100 Commit: Mark Jansen mark.jansen@reactos.org CommitDate: Mon Feb 13 23:20:20 2023 +0100
[BROWSEUI] Fix crash while editing a label in the folder tree
+ Add a missing break CORE-18646 --- dll/win32/browseui/explorerband.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dll/win32/browseui/explorerband.cpp b/dll/win32/browseui/explorerband.cpp index dcab4f4455b..5dd2614bb54 100644 --- a/dll/win32/browseui/explorerband.cpp +++ b/dll/win32/browseui/explorerband.cpp @@ -1218,10 +1218,8 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::HasFocusIO()
HRESULT STDMETHODCALLTYPE CExplorerBand::TranslateAcceleratorIO(LPMSG lpMsg) { - if (m_isEditing) - return S_FALSE; - - if (lpMsg->hwnd == m_hWnd) + if (lpMsg->hwnd == m_hWnd || + (m_isEditing && IsChild(lpMsg->hwnd))) { TranslateMessage(lpMsg); DispatchMessage(lpMsg); @@ -1298,6 +1296,7 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM case TVN_BEGINDRAG: case TVN_BEGINRDRAG: OnTreeItemDragging((LPNMTREEVIEW)lParam, pNotifyHeader->code == TVN_BEGINRDRAG); + break; case TVN_BEGINLABELEDITW: { // TODO: put this in a function ? (mostly copypasta from CDefView) @@ -1317,9 +1316,10 @@ HRESULT STDMETHODCALLTYPE CExplorerBand::OnWinEvent(HWND hWnd, UINT uMsg, WPARAM return E_FAIL;
hr = pParent->GetAttributesOf(1, &pChild, &dwAttr); - if (SUCCEEDED(hr) && (dwAttr & SFGAO_CANRENAME) && theResult) + if (SUCCEEDED(hr) && (dwAttr & SFGAO_CANRENAME)) { - *theResult = 0; + if (theResult) + *theResult = 0; m_isEditing = TRUE; } return S_OK;