diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-08 19:29:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-09 12:58:47 +0100 |
commit | a53a9d9db3cc65f66ea7322de7ec718e8f468b8e (patch) | |
tree | 2d195f462f54815aeb44ebb27102ac68c86f324a | |
parent | 4cade44cff637be919e13e5598a1dadb287846f5 (diff) |
cid#1471587 silence Unchecked dynamic_cast
Change-Id: I1aa2dc5eabe29c66584451959e414e5f4d279aad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109015
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/edit/ednumber.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index a0298ad5ad65..4d75b5d69195 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -403,8 +403,8 @@ private: std::vector<SwNode*> aOutlineNdsArray; public: MakeAllOutlineContentTemporarilyVisibile(SwWrtShell* pShell) + : pWrtShell(pShell) { - pWrtShell = pShell; if (pWrtShell && pWrtShell->GetViewOptions() && pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton()) { // make all outlines content visible and store outline nodes having @@ -429,6 +429,8 @@ public: ~MakeAllOutlineContentTemporarilyVisibile() { + if (!pWrtShell) + return; // restore outlines content visibility for (SwNode* pNd : aOutlineNdsArray) pWrtShell->ToggleOutlineContentVisibility(pNd, true); |