svx/source/svdraw/svdpntv.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 053f7f9ff5a475446da2855e2e71f3ea0ef18791 Author: Patrick Luby <guibmac...@gmail.com> AuthorDate: Mon Apr 1 10:01:03 2024 -0400 Commit: Patrick Luby <guibomac...@gmail.com> CommitDate: Mon Apr 1 19:27:17 2024 +0200 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. Change-Id: I15dc8db60e5520c2f0e73a9a117f25af15845caf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165637 Tested-by: Jenkins Reviewed-by: Patrick Luby <guibomac...@gmail.com> diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 86535232d288..09583787fa24 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)