diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-23 15:24:27 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-23 15:29:32 +0000 |
commit | 7db1dbaa70b4b1ef52d66215e15fc44c9650ef1f (patch) | |
tree | b94b8ecd3834b1945eccf0f2e123fe69c8642dd3 /sc/source/core/tool/interpr4.cxx | |
parent | 1cd5a550073411ea85a1eeaaa4acf1f2ee64f586 (diff) |
coverity#706831 Uncaught exception
also
coverity#706839 Uncaught exception
coverity#706840 Uncaught exception
and probably a gadzillion more
Change-Id: I3c3ceebb259cccc9c41f5a49bd0c95b151dd7c58
Diffstat (limited to 'sc/source/core/tool/interpr4.cxx')
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 114ffb84f0a7..135b01c941b7 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -3150,8 +3150,18 @@ void ScInterpreter::ScMacro() // Funktion ueber den einfachen Namen suchen, // dann aBasicStr, aMacroStr fuer SfxObjectShell::CallBasic zusammenbauen - StarBASIC* pRoot = pDocSh->GetBasic(); - SbxVariable* pVar = pRoot->Find( aMacro, SbxCLASS_METHOD ); + StarBASIC* pRoot; + + try + { + pRoot = pDocSh->GetBasic(); + } + catch (...) + { + pRoot = NULL; + } + + SbxVariable* pVar = pRoot ? pRoot->Find(aMacro, SbxCLASS_METHOD) : NULL; if( !pVar || pVar->GetType() == SbxVOID || !pVar->ISA(SbMethod) ) { PushError( errNoMacro ); |