From cc7b1ee2f3a06c6f0a52f6c6de06b2dd21e1150c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 12 Feb 2014 12:45:25 +0000 Subject: [PATCH] coverity#440982 Dereference after null check Change-Id: I5e19801311c2cb038b6e1c5e7e52a6022f62ea86 --- sfx2/source/control/dispatch.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 830397cb696d..61f8ebf89802 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1368,11 +1368,13 @@ void SfxDispatcher::Update_Impl( sal_Bool bForce ) // keep own tools internally for collecting GetBindings()->GetDispatcher()->pImp->bUpdated = sal_False; + com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame; SfxBindings* pBindings = GetBindings(); - if ( pBindings ) + if (pBindings) + { pBindings->DENTERREGISTRATIONS(); - - com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame = pBindings->GetActiveFrame(); + xFrame = pBindings->GetActiveFrame(); + } com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet( xFrame, com::sun::star::uno::UNO_QUERY ); com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager; if ( xPropSet.is() )