sw/source/uibase/app/applab.cxx | 2 ++ 1 file changed, 2 insertions(+)
New commits: commit 15e08e498a64eca1d4305682d6055a9ab1d568c6 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Feb 9 14:36:51 2023 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Fri Feb 10 10:16:53 2023 +0000 sw: fix crash in SwModule::InsertLab Seen in https://crashreport.libreoffice.org/stats/crash_details/e17357e9-d5e2-4eee-868e-ecf72e04dc41 Change-Id: I32f239249e72b6644b3a38d4dd9bbae65f7bede0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146704 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index 1ea666ccdf61..7ee421ed5ee7 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -181,6 +181,8 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) } SfxViewFrame* pViewFrame = SfxViewFrame::DisplayNewDocument( *xDocSh, rReq ); + if (!pViewFrame) + return; SwView *pNewView = static_cast<SwView*>( pViewFrame->GetViewShell()); pNewView->AttrChangedNotify(nullptr);// So that SelectShell is being called.