diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-03-05 12:30:50 +0000 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-05-25 12:12:29 +0200 |
commit | cfe07093d0cb52e7326f945cc4fbb0281ff39d76 (patch) | |
tree | 2a54e12884ee5f9b01c4186bdffbc0afa9f24cfd | |
parent | 41866a3b40eaab76624a9f5ea4c1870e50e57d1f (diff) |
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 <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index afd8dfcfa28b..d18091bf3ef3 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -740,11 +740,8 @@ void SwNavigationPI::StateChanged(StateChangedType nStateChange) } else if (nStateChange == StateChangedType::ControlFocus) { - if (m_xContentTree) - { - // update documents listbox - UpdateListBox(); - } + // update documents listbox + UpdateListBox(); } } @@ -792,7 +789,7 @@ IMPL_LINK( SwNavigationPI, HeadingsMenuSelectHdl, const OString&, rMenuId, void void SwNavigationPI::UpdateListBox() { - if (isDisposed()) + if (!m_xDocListBox) // disposed return; m_xDocListBox->freeze(); @@ -1051,7 +1048,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, |