diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-01 15:45:39 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-03 07:26:36 +0000 |
commit | 530c8def8a11c98d6e2afab1e4954f5914741b0b (patch) | |
tree | 8d3c0522e15b561fa9f185536ca6df536661b5bc | |
parent | 5eafe30b41c9445b16b2cfe08ac4eb8a9cb3ccb1 (diff) |
tdf#88360: sw: fix crash on closing help in Navigator window
SwContentTree::pActiveShell is not cleared because of a check that the
shell exists, which is only done in the special case bIsConstant.
* at most one of bIsActive or bIsConstant is true
* the only place that calls SetActiveShell() if bIsConstant is true
already checks this condition
So remove the unnecessary check from SetActiveShell()
(regression from 329742e6c9da7cd7848d92a6846e3d1249d8d9b4)
(cherry picked from commit 7ddd6c008142a6b88878ffc96f5e339a0fddd7d9)
Change-Id: Id3b3b98bd38303b5afc529cc8be669872bd354b7
Reviewed-on: https://gerrit.libreoffice.org/15104
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 5a6c75ed307b..b9a9380c0e88 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2220,15 +2220,12 @@ void SwContentTree::SetActiveShell(SwWrtShell* pSh) } else if(bIsConstant) { - if(!lcl_FindShell(pActiveShell)) - { - if (pActiveShell) - EndListening(*pActiveShell->GetView().GetDocShell()); - pActiveShell = pSh; - bIsActive = true; - bIsConstant = false; - bClear = true; - } + if (pActiveShell) + EndListening(*pActiveShell->GetView().GetDocShell()); + pActiveShell = pSh; + bIsActive = true; + bIsConstant = false; + bClear = true; } // Only if it is the active view, the array will be deleted and // the screen filled new. |