]> git.saurik.com Git - wxWidgets.git/commitdiff
added safety check to wxWindow::ReleaseMouse
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 22 Jan 2002 18:53:16 +0000 (18:53 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 22 Jan 2002 18:53:16 +0000 (18:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wincmn.cpp

index c6a369eb14aa158cfe15372e16c6d3ea98dd8e09..2801de986d8701fd34a32cee7fded582e7f4beff 100644 (file)
@@ -1646,6 +1646,8 @@ void wxWindowBase::ReleaseMouse()
 {
     wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(0x%08x)"), this);
 
 {
     wxLogTrace(_T("mousecapture"), _T("ReleaseMouse(0x%08x)"), this);
 
+    wxASSERT_MSG( GetCapture() == this, wxT("attempt to release mouse, but this window hasn't captured it") )
+
     DoReleaseMouse();
 
     if ( ms_winCaptureNext )
     DoReleaseMouse();
 
     if ( ms_winCaptureNext )