diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-08 16:11:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-08 16:26:28 +0100 |
commit | 005976286b7b30905354d8b1b26fe3f84402d259 (patch) | |
tree | e1f53f60808a7f1cbac508099fec3a330db6f693 /sfx2 | |
parent | 53f03a3c83dd31c66c1577bba1bc03b47bf68d77 (diff) |
coverity#704796 Dereference after null check
Change-Id: I97aaaa38620f162a3a4d08bb66690815beb7880e
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/menu/mnumgr.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 379905b7215c..51536b7e66c1 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -219,11 +219,16 @@ IMPL_LINK( SfxMenuManager, Select, Menu *, pSelMenu ) } } - if ( !aCommand.isEmpty() ) + if (!aCommand.isEmpty() && pBindings) { pBindings->ExecuteCommand_Impl( aCommand ); + return sal_True; } - else if ( pBindings->IsBound(nId) ) + + if (!pBindings) + return sal_True; + + if ( pBindings->IsBound(nId) ) // normal function pBindings->Execute( nId ); else |