sc/source/ui/view/formatsh.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 6cfd36a392ec3710304ff3df3cb0f42e0d8b53d9 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Oct 10 16:29:16 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Oct 10 21:44:09 2023 +0200 tdf#154142 null-deref in SfxUndoManager::SetMaxUndoActionCount Change-Id: I09cfbccb5f2ffa009a3e40157c9373b7e10864dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157764 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index 0eea4d0f6bdf..028fdc77b3b0 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -135,7 +135,7 @@ ScFormatShell::ScFormatShell(ScViewData& rData) : SetPool( &pTabViewShell->GetPool() ); SfxUndoManager* pMgr = rViewData.GetSfxDocShell()->GetUndoManager(); SetUndoManager( pMgr ); - if ( !rViewData.GetDocument().IsUndoEnabled() ) + if (pMgr && !rViewData.GetDocument().IsUndoEnabled()) { pMgr->SetMaxUndoActionCount( 0 ); }