sw/source/uibase/utlui/navipi.cxx |   11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 37673f115fb3f8afb85fb0b5a2713ec9c1497771
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 5 12:30:50 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 5 21:25:16 2021 +0100

    use m_xDocListBox to detect we're disposed
    
    Change-Id: Ie04b73e9e57e966c489b401b675ab6e95d2ecfce
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112015
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/utlui/navipi.cxx 
b/sw/source/uibase/utlui/navipi.cxx
index 7e0883f03c26..5a1de153b65c 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -760,11 +760,8 @@ void SwNavigationPI::StateChanged(StateChangedType 
nStateChange)
     }
     else if (nStateChange == StateChangedType::ControlFocus)
     {
-        if (m_xContentTree)
-        {
-            // update documents listbox
-            UpdateListBox();
-        }
+        // update documents listbox
+        UpdateListBox();
     }
 }
 
@@ -812,7 +809,7 @@ IMPL_LINK( SwNavigationPI, HeadingsMenuSelectHdl, const 
OString&, rMenuId, void
 
 void SwNavigationPI::UpdateListBox()
 {
-    if (isDisposed())
+    if (!m_xDocListBox) // disposed
         return;
 
     m_xDocListBox->freeze();
@@ -1069,7 +1066,7 @@ bool SwNavigationPI::IsGlobalDoc() const
 
 IMPL_LINK_NOARG(SwNavigationPI, ChangePageHdl, Timer *, void)
 {
-    if (IsDisposed())
+    if (!m_xDocListBox) // disposed
         return;
     // tdf#134959 if the SpinButton changed value this Timer was launched, now
     // change to the desired page, but we leave focus where it currently is,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to