diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-06 10:50:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-06 11:32:55 +0100 |
commit | e1ac3f386c892c5d0e79ceccd1e6e791dce9fcf1 (patch) | |
tree | 100c18f434afb29eddb7014e00dde25fcd742963 /sc/source/ui/docshell/macromgr.cxx | |
parent | 246aba2af9a7e8f958124d7f16d68da2ff7791a6 (diff) |
coverity#735812 Dereference after null check
Change-Id: Ie839246f637d079e8e16553c85c682d599d86b58
Diffstat (limited to 'sc/source/ui/docshell/macromgr.cxx')
-rw-r--r-- | sc/source/ui/docshell/macromgr.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/docshell/macromgr.cxx b/sc/source/ui/docshell/macromgr.cxx index 263ed4e617e4..b4e0e336d82c 100644 --- a/sc/source/ui/docshell/macromgr.cxx +++ b/sc/source/ui/docshell/macromgr.cxx @@ -132,7 +132,9 @@ void ScMacroManager::InitUserFuncData() Reference< container::XContainer > xModuleContainer; SfxObjectShell* pShell = mpDoc->GetDocumentShell(); - if (pShell && !pShell->GetBasicManager()->GetName().isEmpty()) + if (!pShell) + return; + if (!pShell->GetBasicManager()->GetName().isEmpty()) { sProjectName = pShell->GetBasicManager()->GetName(); } @@ -151,7 +153,7 @@ void ScMacroManager::InitUserFuncData() xModuleContainer->addContainerListener( mxContainerListener ); } } - catch( uno::Exception& ) + catch (const uno::Exception&) { } } |