diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-11-26 09:19:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-26 09:19:52 +0000 |
commit | 4584e3a6df74b1d83c077f3b33a6515c2aab1aa5 (patch) | |
tree | 2e708e878ba0e85c61753036b2e0834d78f3a884 /vcl/source/window/mouse.cxx | |
parent | 5e1546ccbce1c8fcea16c191edc1409da04c9193 (diff) |
test for IsMouseCaptured before releasing mouse
like the other call sites do
Change-Id: I77250f172f9d9ce97e5982bafbc8f042e9343acc
Diffstat (limited to 'vcl/source/window/mouse.cxx')
-rw-r--r-- | vcl/source/window/mouse.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 198e4cde7460..330cb701a695 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -468,10 +468,10 @@ void Window::ReleaseMouse() ImplSVData* pSVData = ImplGetSVData(); - SAL_WARN_IF( pSVData->maWinData.mpCaptureWin.get() != this, "vcl", + SAL_WARN_IF(!IsMouseCaptured(), "vcl", "Window::ReleaseMouse(): window doesn't have the mouse capture" ); - if ( pSVData->maWinData.mpCaptureWin.get() == this ) + if (IsMouseCaptured()) { pSVData->maWinData.mpCaptureWin = nullptr; mpWindowImpl->mpFrame->CaptureMouse( false ); |