summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-01 15:45:39 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-01 15:49:58 +0200
commit7ddd6c008142a6b88878ffc96f5e339a0fddd7d9 (patch)
tree70190c769f79afd79a1a7ce8cb3d5aca0c8f3183
parent15d00363bbf13f26f5de02f958923a80a4f652eb (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() Change-Id: Id3b3b98bd38303b5afc529cc8be669872bd354b7
-rw-r--r--sw/source/uibase/utlui/content.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 7e82523886a5..b2a8e34b02c4 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.