summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-12-18 07:30:14 -0500
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2022-05-23 11:21:16 +0200
commite901a1e3a6914da49cc69fbb898cf2df1e9e92c7 (patch)
tree52df73363ba97b238d130aab0b79f198406e25aa
parentAvoid crash on closing docking window (diff)
downloadcore-e901a1e3a6914da49cc69fbb898cf2df1e9e92c7.tar.gz
core-e901a1e3a6914da49cc69fbb898cf2df1e9e92c7.zip
vcl: don't use null window in FloatingWindow HitTest
Change-Id: I551f31cf30c7a58642becebe0256684055d0703a Reviewed-on: https://gerrit.libreoffice.org/85383 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 65685bac09a4320602f4dda5151d247c5a83a75c)
-rw-r--r--vcl/source/window/floatwin.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index baa3a46bc978..4eef15b88be2 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -520,6 +520,8 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const
// use the border window to have the exact position
vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border );
+ if (!pBorderWin)
+ break;
// the top-left corner in output coordinates ie (0,0)
tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( Point(), pBorderWin->GetSizePixel()) ) ) ;