From 01c346fe915e24ee6876f5a1e37a34852def1bbb Mon Sep 17 00:00:00 2001 From: Chris Diamand Date: Wed, 8 Apr 2015 22:52:24 +0100 Subject: [PATCH] Don't capture the mouse if it's already captured. Otherwise the following assertion gets triggered: ../src/common/wincmn.cpp(3271): assert "!wxMouseCapture::IsInCaptureStack(this)" failed in CaptureMouse(): Recapturing the mouse in the same window? Based on the fix provided for an identical assertion triggered elsewhere, described here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765779 --- src/TrackPanel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 36f035bca..ec92c5e11 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -6126,7 +6126,8 @@ void TrackPanel::OnMouseEvent(wxMouseEvent & event) if (event.ButtonDown()) { SetFocus(); - CaptureMouse(); + if (!HasCapture()) + CaptureMouse(); } else if (event.ButtonUp()) { if (HasCapture())