diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 12:45:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 13:03:58 +0000 |
commit | cc7b1ee2f3a06c6f0a52f6c6de06b2dd21e1150c (patch) | |
tree | 66c1dce696eac96561cb215a2da19d05b590081b /sfx2 | |
parent | 7141cfa6a37209cca989709167937440c4f8aa75 (diff) |
coverity#440982 Dereference after null check
Change-Id: I5e19801311c2cb038b6e1c5e7e52a6022f62ea86
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 8 |
1 files 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() ) |