From e3cf16e6fbf8d39cad8762f002b6db1d4f61ed36 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 07:03:24 +0200 Subject: Merging upstream version 4:24.2.3. Signed-off-by: Daniel Baumann --- svx/source/svdraw/svdpntv.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'svx/source/svdraw/svdpntv.cxx') diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index f092887250..780227f4a1 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -858,7 +858,12 @@ void SdrPaintView::InvalidateAllWin(const tools::Rectangle& rRect) void SdrPaintView::InvalidateOneWin(OutputDevice& rDevice) { // do not erase background, that causes flicker (!) - rDevice.GetOwnerWindow()->Invalidate(InvalidateFlags::NoErase); + // tdf#160444 check device's owner window is a nullptr + // Since commit 563f7077f1dbce31ff95ee8d2e8d17b629693db1, the + // device's owner window gets deleted before this object is + // deleted. + if (rDevice.GetOwnerWindow()) + rDevice.GetOwnerWindow()->Invalidate(InvalidateFlags::NoErase); } void SdrPaintView::InvalidateOneWin(OutputDevice& rDevice, const tools::Rectangle& rRect) -- cgit v1.2.3