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 )