sd/source/ui/unoidl/unomodel.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 2eee4d959840b100b193792e2c8d072254ad78b9 Author: Miklos Vajna <[email protected]> AuthorDate: Fri Nov 21 09:28:13 2025 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Mon Nov 24 09:47:18 2025 +0100 sd: fix crash in SdXImpressDocument::postMouseEvent() gdb trace on the core file: #0 0x0000774df1e04d9d in SdrPageView::GetPage (this=0x0) at include/svx/svdpagv.hxx:167 #1 SdXImpressDocument::postMouseEvent (this=<optimized out>, nType=2, nX=<optimized out>, nY=<optimized out>, nCount=1, nButtons=0, nModifier=0) at sd/source/ui/unoidl/unomodel.cxx:4370 #2 0x0000774e00fbec12 in doc_postMouseEvent (pThis=0x3cd69250, nType=2, nX=-180, nY=2220, nCount=1, nButtons=0, nModifier=0) at desktop/source/lib/init.cxx:5661 #3 0x000000000058ab29 in lok::Document::postMouseEvent (nModifier=0, nButtons=0, nCount=<optimized out>, nY=<optimized out>, nX=<optimized out>, nType=<optimized out>, this=<optimized out>) at include/LibreOfficeKit/LibreOfficeKit.hxx:297 Handle it similar to the nullptr sd Window just a bit later. Change-Id: I7a6e7dfc6971f266e1205ee3b92eb1ed5bae1025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194339 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index b1809543b825..381edc236775 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -4321,6 +4321,11 @@ void SdXImpressDocument::postMouseEvent(int nType, int nX, int nY, int nCount, i const Point aPointHMM = o3tl::convert(aPointTwip, o3tl::Length::twip, o3tl::Length::mm100); SdrView* pDrawView = pViewShell->GetDrawView(); SdrPageView* pPageView = pDrawView->GetSdrPageView(); + if (!pPageView) + { + return; + } + SdrPage* pPage = pPageView->GetPage(); ::sd::Window* pActiveWin = pViewShell->GetActiveWindow(); if (!pActiveWin)
