summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2012-01-26 01:02:30 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2012-01-26 03:03:08 +0900
commitbb51e8e72be424f0fd92350006c536a97fd4b210 (patch)
tree043f66cf4677e8fe69309be76565515e4a68f9a0 /basic
parentNew unit test for pivot table's date output handling. (diff)
downloadcore-bb51e8e72be424f0fd92350006c536a97fd4b210.tar.gz
core-bb51e8e72be424f0fd92350006c536a97fd4b210.zip
Deleting a null pointer is safe
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sbxmod.cxx11
-rw-r--r--basic/source/sbx/sbxbase.cxx3
2 files changed, 5 insertions, 9 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index d61b63cd0621..40ae0d7bffbf 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -541,13 +541,10 @@ SbModule::SbModule( const String& rName, sal_Bool bVBACompat )
SbModule::~SbModule()
{
OSL_TRACE("Module named %s is destructing", rtl::OUStringToOString( GetName(), RTL_TEXTENCODING_UTF8 ).getStr() );
- if( pImage )
- delete pImage;
- if( pBreaks )
- delete pBreaks;
- if( pClassData )
- delete pClassData;
- mxWrapper = NULL;
+ delete pImage;
+ delete pBreaks;
+ delete pClassData;
+ mxWrapper = NULL;
}
uno::Reference< script::XInvocation >
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 303f382b6b56..e2987d0724cf 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -55,8 +55,7 @@ SbxAppData& GetSbxData_Impl()
SbxAppData::~SbxAppData()
{
- if( pBasicFormater )
- delete pBasicFormater;
+ delete pBasicFormater;
}