diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-01-26 01:02:30 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-01-26 03:03:08 +0900 |
commit | bb51e8e72be424f0fd92350006c536a97fd4b210 (patch) | |
tree | 043f66cf4677e8fe69309be76565515e4a68f9a0 /basic | |
parent | 85d34beec5f8196896487c96028b2dc2ce3cf6c8 (diff) |
Deleting a null pointer is safe
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbxmod.cxx | 11 | ||||
-rw-r--r-- | basic/source/sbx/sbxbase.cxx | 3 |
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; } |