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() ...@@ -65,10 +65,7 @@ CtrlList::~CtrlList()
{ {
m_rList.getPositionVar().delObserver( this ); m_rList.getPositionVar().delObserver( this );
m_rList.delObserver( this ); m_rList.delObserver( this );
if( m_pImage )
{
delete m_pImage; delete m_pImage;
}
} }
...@@ -411,10 +408,7 @@ void CtrlList::autoScroll() ...@@ -411,10 +408,7 @@ void CtrlList::autoScroll()
void CtrlList::makeImage() void CtrlList::makeImage()
{ {
if( m_pImage )
{
delete m_pImage; delete m_pImage;
}
// Get the size of the control // Get the size of the control
const Position *pPos = getPosition(); const Position *pPos = getPosition();
......
...@@ -85,7 +85,7 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler, ...@@ -85,7 +85,7 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
FileBitmap::~FileBitmap() 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 ): ...@@ -36,10 +36,7 @@ FT2Bitmap::FT2Bitmap( intf_thread_t *pIntf, int width, int height ):
FT2Bitmap::~FT2Bitmap() FT2Bitmap::~FT2Bitmap()
{ {
if( m_pData )
{
delete[] m_pData; delete[] m_pData;
}
} }
......
...@@ -104,9 +104,6 @@ ScaledBitmap::ScaledBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap, ...@@ -104,9 +104,6 @@ ScaledBitmap::ScaledBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
ScaledBitmap::~ScaledBitmap() ScaledBitmap::~ScaledBitmap()
{ {
if( m_pData )
{
delete[] m_pData; delete[] m_pData;
}
} }
...@@ -130,10 +130,7 @@ UString::UString( intf_thread_t *pIntf, const char *pString ): ...@@ -130,10 +130,7 @@ UString::UString( intf_thread_t *pIntf, const char *pString ):
UString::~UString() UString::~UString()
{ {
if( m_pString )
{
delete[] m_pString; delete[] m_pString;
}
} }
......
...@@ -211,7 +211,6 @@ int CAtmoConfig::getNumChannelAssignments() { ...@@ -211,7 +211,6 @@ int CAtmoConfig::getNumChannelAssignments() {
void CAtmoConfig::clearChannelMappings() { void CAtmoConfig::clearChannelMappings() {
for(int i=1;i<10;i++) { for(int i=1;i<10;i++) {
tChannelAssignment *ca = m_ChannelAssignments[i]; tChannelAssignment *ca = m_ChannelAssignments[i];
if(ca!=NULL)
delete ca; delete ca;
m_ChannelAssignments[i] = NULL; m_ChannelAssignments[i] = NULL;
} }
...@@ -220,7 +219,6 @@ void CAtmoConfig::clearChannelMappings() { ...@@ -220,7 +219,6 @@ void CAtmoConfig::clearChannelMappings() {
void CAtmoConfig::clearAllChannelMappings() { void CAtmoConfig::clearAllChannelMappings() {
for(int i=0;i<10;i++) { for(int i=0;i<10;i++) {
tChannelAssignment *ca = m_ChannelAssignments[i]; tChannelAssignment *ca = m_ChannelAssignments[i];
if(ca!=NULL)
delete ca; delete ca;
m_ChannelAssignments[i] = NULL; 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