diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-11-07 12:49:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-07 12:49:03 +0000 |
commit | 2411ea09a8d20609e48b0750ab2102c00e0c3b8a (patch) | |
tree | 18c8dd0e5784ea488e2744067225689b85f8ed1f /vcl/source/window/window.cxx | |
parent | 2ea9da71470a9e2a442ec6a660de47691a3f8723 (diff) |
redundant if not-null checks on delete
Diffstat (limited to 'vcl/source/window/window.cxx')
-rw-r--r-- | vcl/source/window/window.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index f64a3a6daecf..1dc681cac964 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1899,8 +1899,7 @@ sal_Bool Window::ImplSetClipFlagChilds( sal_Bool bSysObjOnlySmaller ) bUpdate = sal_False; } - if ( pOldRegion ) - delete pOldRegion; + delete pOldRegion; } else { @@ -2459,8 +2458,7 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) if( !aSelectionRect.IsEmpty() ) DrawSelectionBackground( aSelectionRect, 3, sal_False, sal_True, sal_False ); - if ( pChildRegion ) - delete pChildRegion; + delete pChildRegion; } // ----------------------------------------------------------------------- @@ -3469,10 +3467,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, mpWindowImpl->mpSysObj->SetPosSize( mnOutOffX, mnOutOffY, mnOutWidth, mnOutHeight ); } - if ( pOverlapRegion ) - delete pOverlapRegion; - if ( pOldRegion ) - delete pOldRegion; + delete pOverlapRegion; + delete pOldRegion; } // ----------------------------------------------------------------------- |