From f0593f1a81b0973bfaa3a0b658118ab8874ee2bb Mon Sep 17 00:00:00 2001 From: Don HO Date: Thu, 4 Apr 2019 19:44:33 +0200 Subject: [PATCH] Fix crash while right clicking on DocSwitcher's column bar Fix #5479 --- .../VerticalFileSwitcher/VerticalFileSwitcher.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp index fcfb045fe..ab36c7fc7 100644 --- a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp @@ -121,6 +121,13 @@ INT_PTR CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, { // Switch to the right document LPNMITEMACTIVATE lpnmitem = (LPNMITEMACTIVATE) lParam; + + if (lpnmitem->hdr.hwndFrom != _fileListView.getHSelf()) + { + // Do nothing + return TRUE; + } + int nbItem = ListView_GetItemCount(_fileListView.getHSelf()); if (nbSelectedFiles() == 1)