summaryrefslogtreecommitdiff
path: root/library
authorzecke <zecke>2004-12-26 14:12:19 (UTC)
committer zecke <zecke>2004-12-26 14:12:19 (UTC)
commitb4f1865343e70fe27750084b1f1d959c28ec7762 (patch) (side-by-side diff)
tree6ac4b269066d82cf1ab198cd33477f3299fdad0e /library
parent99b055b572f64f180751b3a43440796d1bf9fc4f (diff)
downloadopie-b4f1865343e70fe27750084b1f1d959c28ec7762.zip
opie-b4f1865343e70fe27750084b1f1d959c28ec7762.tar.gz
opie-b4f1865343e70fe27750084b1f1d959c28ec7762.tar.bz2
QWidget *wid = 0;
delete wid; is legal c++ code. So make sure when freeing we obey c++ but take into account that free(NULL) is not legal.
Diffstat (limited to 'library') (more/less context) (show whitespace changes)
-rw-r--r--library/qpeapplication.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 43a9be5..af00f49 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -2272,4 +2272,5 @@ void* operator new( size_t size )
void operator delete[]( void* p )
{
+ if ( p )
free( p );
}
@@ -2277,4 +2278,5 @@ void operator delete[]( void* p )
void operator delete[]( void* p, size_t /*size*/ )
{
+ if ( p )
free( p );
}
@@ -2283,4 +2285,5 @@ void operator delete[]( void* p, size_t /*size*/ )
void operator delete( void* p )
{
+ if ( p )
free( p );
}
@@ -2288,4 +2291,5 @@ void operator delete( void* p )
void operator delete( void* p, size_t /*size*/ )
{
+ if ( p )
free( p );
}