]> git.saurik.com Git - wxWidgets.git/commitdiff
add assert checking that GetCapture() and ms_winCaptureCurrentare in sync
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 13 Aug 2008 09:00:36 +0000 (09:00 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 13 Aug 2008 09:00:36 +0000 (09:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55076 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp

index 8ce661082e3f6806a84fa5f65ed372620faa546c..c40aa1d746070b42912850d697c976a42a95738a 100644 (file)
@@ -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;