Version 18.104.22.168 and 22.214.171.124
WinMerge crashes when using IBM TrackPoint middle-button scrolling on diff pane.
Please see the attached screenshot. It shows the crash was caused in CSplitterWnd::OnVScroll().
I think that it is strange that the OnVScroll event occurs when trying to scroll on diff pane. Because the diff pane doesn't have a vertical scroll bar.
I don't know whether the following fix is correct but it prevents the crash by not calling CSplitterWnd::OnVScroll() when a window doesn't have a vertical scroll bar.
--- Common/SplitterWndEx.cpp (revision 4854)
+++ Common/SplitterWndEx.cpp (working copy)
@@ -114,13 +114,14 @@
// scroll bar)
if (pScrollBar == NULL)
- // maintain original synchronization functionality (all panes left from the scrollbar)
- CSplitterWnd::OnVScroll(nSBCode, nPos, pScrollBar);
// only sync if shared vertical bars if\(\(GetScrollStyle\(\)&WS\_VSCROLL\) == 0\) return;
+ // maintain original synchronization functionality (all panes left from the scrollbar)
+ CSplitterWnd::OnVScroll(nSBCode, nPos, pScrollBar);
// enhance with proportional vertical scroll synchronization
ASSERT(pScrollBar != NULL);
int curRow = ::GetDlgCtrlID(pScrollBar->m_hWnd) - AFX_IDW_VSCROLL_FIRST;
Log in to post a comment.