From 31b9d29fd7e1092c2442550eb77cd8477d73c936 Mon Sep 17 00:00:00 2001
From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= <vslavik@fastmail.fm>
Date: Wed, 13 Aug 2008 09:00:36 +0000
Subject: [PATCH] add assert checking that GetCapture() and
 ms_winCaptureCurrentare in sync

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/common/wincmn.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp
index 8ce661082e..c40aa1d746 100644
--- a/src/common/wincmn.cpp
+++ b/src/common/wincmn.cpp
@@ -2641,7 +2641,10 @@ void wxWindowBase::ReleaseMouse()
 
     wxASSERT_MSG( !ms_winCaptureChanging, _T("recursive ReleaseMouse call?") );
 
-    wxASSERT_MSG( GetCapture() == this, wxT("attempt to release mouse, but this window hasn't captured it") );
+    wxASSERT_MSG( GetCapture() == this,
+                  "attempt to release mouse, but this window hasn't captured it" );
+    wxASSERT_MSG( ms_winCaptureCurrent == this,
+                  "attempt to release mouse, but this window hasn't captured it" );
 
     ms_winCaptureChanging = true;
 
-- 
2.47.2