sd/source/ui/view/Outliner.cxx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
New commits: commit 196fab317381872a80879420c0a2b8fbcb08af39 Author: Sarper Akdemir <sarper.akde...@allotropia.de> AuthorDate: Mon Jun 10 10:40:27 2024 +0200 Commit: Sarper Akdemir <sarper.akde...@allotropia.de> CommitDate: Mon Jun 10 10:46:23 2024 +0200 Fix crash on search initated from notes pane on the OutlineView Change-Id: I128f5398a9abec57168d72a711fadab2584c4a94 diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 727cef1a7f9f..f43570bb9a68 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -999,14 +999,17 @@ void SdOutliner::DetectChange() pFakeShell = pViewShellManager->GetOverridingMainShell(); auto bViewChanged = false; - if( !pFakeShell && pDrawViewShell ) - bViewChanged = (aPosition.meEditMode != pDrawViewShell->GetEditMode() || aPosition.mePageKind != pDrawViewShell->GetPageKind()); - else if (pFakeShell) - { - auto pPage = pFakeShell->getCurrentPage(); - auto ePageKind = pPage ? pPage->GetPageKind() : PageKind::Standard; - auto eEditMode = EditMode::Page; - bViewChanged = (aPosition.meEditMode != eEditMode || aPosition.mePageKind != ePageKind); + if( pDrawViewShell ) + { + if( !pFakeShell ) + bViewChanged = (aPosition.meEditMode != pDrawViewShell->GetEditMode() || aPosition.mePageKind != pDrawViewShell->GetPageKind()); + else + { + auto pPage = pFakeShell->getCurrentPage(); + auto ePageKind = pPage ? pPage->GetPageKind() : PageKind::Standard; + auto eEditMode = EditMode::Page; + bViewChanged = (aPosition.meEditMode != eEditMode || aPosition.mePageKind != ePageKind); + } } // Detect whether the view has been switched from the outside.