diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-21 16:01:47 -0400 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-21 16:05:33 -0400 |
commit | a0872eae81c09edcadc3ceac0f96e2be82340d82 (patch) | |
tree | 21b7482da7c02c03eba82aa9e74caf2e6dda812e /sc/source/ui/docshell/docfunc.cxx | |
parent | 74cac597d25ed613072e9a607115de420beecd98 (diff) |
Fix seg faults on sheet deletion.
Sometimes a simple sheet removal causes segfault in certain types of
documents. Not always reproducible, but this fix is certainly safer.
(n#680272)
Signed-off-by: Noel Power <nopower@novell.com>
Diffstat (limited to 'sc/source/ui/docshell/docfunc.cxx')
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 7f7298821f11..e9376dd15668 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2712,7 +2712,7 @@ void VBA_DeleteModule( ScDocShell& rDocSh, String& sModuleName ) uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( xLib, uno::UNO_QUERY ); if( xLib->hasByName( sModuleName ) ) xLib->removeByName( sModuleName ); - if ( xVBAModuleInfo.is() ) + if ( xVBAModuleInfo.is() && xVBAModuleInfo->hasModuleInfo(sModuleName) ) xVBAModuleInfo->removeModuleInfo( sModuleName ); } |