sw/source/uibase/misc/redlndlg.cxx |    6 ++----
 sw/source/uibase/utlui/content.cxx |    5 +----
 2 files changed, 3 insertions(+), 8 deletions(-)

New commits:
commit af07387ade5218a5f584d122e022c2575db852ed
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Feb 25 21:13:42 2023 +0000
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Feb 27 11:27:40 2023 +0000

    cid#1521509 Logically dead code
    
    and
    
    cid#1521507 Logically dead code
    
    Change-Id: I1d2c9ee4a4099fadb5da7a6850b4124488e2ebe8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147726
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/uibase/misc/redlndlg.cxx 
b/sw/source/uibase/misc/redlndlg.cxx
index 85ab6d718479..037e3f5c317d 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -246,8 +246,6 @@ void SwRedlineAcceptDlg::InitAuthors()
 
     SwView *pView = ::GetActiveView();
     SwWrtShell* pSh = pView ? pView->GetWrtShellPtr() : nullptr;
-    if (!pSh)
-        return;
 
     SvxTPFilter *pFilterPage = m_xTabPagesCTRL->GetFilterPage();
 
@@ -1131,12 +1129,12 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, SelectHdl, 
weld::TreeView&, void)
 
 IMPL_LINK_NOARG(SwRedlineAcceptDlg, GotoHdl, Timer *, void)
 {
+    m_aSelectTimer.Stop();
+
     SwWrtShell* pSh = ::GetActiveView()->GetWrtShellPtr();
     if (!pSh)
         return;
 
-    m_aSelectTimer.Stop();
-
     bool bIsNotFormated = false;
     bool bSel = false;
 
diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 48be29d67b08..602037a91e5d 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3723,10 +3723,7 @@ IMPL_LINK_NOARG(SwContentTree, TimerUpdate, Timer *, 
void)
     // Query view because the Navigator is cleared too late.
     SwView* pView = GetParentWindow()->GetCreateView();
 
-    if (!pView)
-        return;
-
-    SwWrtShell* pActShell = pView->GetWrtShellPtr();
+    SwWrtShell* pActShell = pView ? pView->GetWrtShellPtr() : nullptr;
     if(pActShell && pActShell->GetWin() &&
         (pActShell->GetWin()->HasFocus() || m_bDocHasChanged || 
m_bViewHasChanged) &&
         !IsInDrag() && !pActShell->ActionPend())

Reply via email to