From: Václav Slavík Date: Tue, 22 Jan 2002 18:53:16 +0000 (+0000) Subject: added safety check to wxWindow::ReleaseMouse X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a7b09001af8d72c2c151ac01597965616b13b14c?ds=inline added safety check to wxWindow::ReleaseMouse git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index c6a369eb14..2801de986d 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1646,6 +1646,8 @@ void wxWindowBase::ReleaseMouse() { 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 )