diff options
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 129626425fd5..5c4ee6e223b6 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2276,10 +2276,10 @@ void SwContentTree::Notify(SfxBroadcaster & rBC, SfxHint const& rHint) SfxViewEventHint const*const pVEHint( dynamic_cast<SfxViewEventHint const*>(&rHint)); - if (pActiveShell - && pVEHint && pVEHint->GetEventName() == "OnViewClosed" - && dynamic_cast<SwXTextView *>(pVEHint->GetController().get()) - ->GetView() == &pActiveShell->GetView()) + SwXTextView* pDyingShell = NULL; + if (pActiveShell && pVEHint && pVEHint->GetEventName() == "OnViewClosed") + pDyingShell = dynamic_cast<SwXTextView*>(pVEHint->GetController().get()); + if (pDyingShell && pDyingShell->GetView() == &pActiveShell->GetView()) { SetActiveShell(0); // our view is dying, clear our pointers to it } |