summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docfunc.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2011-03-21 16:01:47 -0400
committerKohei Yoshida <kyoshida@novell.com>2011-03-21 16:05:33 -0400
commita0872eae81c09edcadc3ceac0f96e2be82340d82 (patch)
tree21b7482da7c02c03eba82aa9e74caf2e6dda812e /sc/source/ui/docshell/docfunc.cxx
parent74cac597d25ed613072e9a607115de420beecd98 (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.cxx2
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 );
}