Commit 13761f2a authored by Rémi Duraffort's avatar Rémi Duraffort

That's safe to delete NULL.

parent 3d14423a
......@@ -65,10 +65,7 @@ CtrlList::~CtrlList()
{
m_rList.getPositionVar().delObserver( this );
m_rList.delObserver( this );
if( m_pImage )
{
delete m_pImage;
}
delete m_pImage;
}
......@@ -411,10 +408,7 @@ void CtrlList::autoScroll()
void CtrlList::makeImage()
{
if( m_pImage )
{
delete m_pImage;
}
delete m_pImage;
// Get the size of the control
const Position *pPos = getPosition();
......
......@@ -85,7 +85,7 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
FileBitmap::~FileBitmap()
{
if( m_pData ) delete[] m_pData;
delete[] m_pData;
}
......
......@@ -36,10 +36,7 @@ FT2Bitmap::FT2Bitmap( intf_thread_t *pIntf, int width, int height ):
FT2Bitmap::~FT2Bitmap()
{
if( m_pData )
{
delete[] m_pData;
}
delete[] m_pData;
}
......
......@@ -104,9 +104,6 @@ ScaledBitmap::ScaledBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
ScaledBitmap::~ScaledBitmap()
{
if( m_pData )
{
delete[] m_pData;
}
delete[] m_pData;
}
......@@ -130,10 +130,7 @@ UString::UString( intf_thread_t *pIntf, const char *pString ):
UString::~UString()
{
if( m_pString )
{
delete[] m_pString;
}
delete[] m_pString;
}
......
......@@ -211,8 +211,7 @@ int CAtmoConfig::getNumChannelAssignments() {
void CAtmoConfig::clearChannelMappings() {
for(int i=1;i<10;i++) {
tChannelAssignment *ca = m_ChannelAssignments[i];
if(ca!=NULL)
delete ca;
delete ca;
m_ChannelAssignments[i] = NULL;
}
}
......@@ -220,8 +219,7 @@ void CAtmoConfig::clearChannelMappings() {
void CAtmoConfig::clearAllChannelMappings() {
for(int i=0;i<10;i++) {
tChannelAssignment *ca = m_ChannelAssignments[i];
if(ca!=NULL)
delete ca;
delete ca;
m_ChannelAssignments[i] = NULL;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment