[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Mon Mar 21 13:06:58 PDT 2011


 sc/source/ui/docshell/docfunc.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 05ea11a238d608532842ddbc1cbcd81f4d9e8c02
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Mon Mar 21 16:01:47 2011 -0400

    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 at novell.com>

diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 617cfd1..11259cc 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 );
 
     }


More information about the Libreoffice-commits mailing list