diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 197b842a5d22..b9e6280fcd25 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1175,9 +1175,8 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) return; // we know only SfxEventHint or simple SfxHint - if ( dynamic_cast(&rHint) ) + if (const SfxEventHint* pEventHint = dynamic_cast(&rHint)) { - const SfxEventHint* pEventHint = dynamic_cast(&rHint); // When the Document is loaded asynchronously, was the Dispatcher // set as ReadOnly, to what must be returned when the document itself // is not read only, and the loading is finished.