[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdenetwork/kopete
From:       Laurent Montel <montel () kde ! org>
Date:       2011-04-21 7:48:55
Message-ID: 20110421074855.54561AC85D () svn ! kde ! org
[Download RAW message or body]

SVN commit 1228628 by mlaurent:

Don't check pointer before to delete it


 M  +1 -1      plugins/autoreplace/autoreplacepreferences.cpp  
 M  +0 -2      protocols/bonjour/bonjouraccount.cpp  
 M  +0 -3      protocols/bonjour/bonjourcontact.cpp  
 M  +0 -4      protocols/gadu/gaducommands.cpp  
 M  +0 -2      protocols/gadu/gadudcc.cpp  
 M  +0 -4      protocols/gadu/gadudccserver.cpp  
 M  +0 -4      protocols/gadu/gadudcctransaction.cpp  
 M  +0 -4      protocols/gadu/gadusession.cpp  
 M  +0 -1      protocols/irc/libkirc/plugins/ctcp/kirctransferserver.cpp  
 M  +0 -6      protocols/jabber/jingle/mediamanager.cpp  
 M  +0 -6      protocols/wlm/wlmaccount.cpp  


--- trunk/KDE/kdenetwork/kopete/plugins/autoreplace/autoreplacepreferences.cpp \
#1228627:1228628 @@ -133,7 +133,7 @@
 		Q3ListViewItem * lvi;
 		Q3ListViewItem * oldLvi = 0;
 		// see if we are replacing an existing entry
-		if ( ( oldLvi = preferencesDialog->m_list->findItem( k, 0 ) ) )
+		oldLvi = preferencesDialog->m_list->findItem( k, 0 );
 			delete oldLvi;
 		lvi = new Q3ListViewItem( preferencesDialog->m_list, k, v );
 		// Triggers a size, geometry and content update
--- trunk/KDE/kdenetwork/kopete/protocols/bonjour/bonjouraccount.cpp #1228627:1228628
@@ -308,10 +308,8 @@
 {
 	wipeOutAllContacts();
 
-	if (browser) {
 		delete browser;
 		browser = NULL;
-	}
 
 	if (localServer) {
 		localServer->close();
--- trunk/KDE/kdenetwork/kopete/protocols/bonjour/bonjourcontact.cpp #1228627:1228628
@@ -46,9 +46,7 @@
 BonjourContact::~BonjourContact()
 {
 	kDebug()<<"Deleting Contact!";
-	if (connection) {
 		delete connection;
-	}
 	remotePort = 0;
 }
 
@@ -190,7 +188,6 @@
 
 void BonjourContact::setConnection(BonjourContactConnection *c)
 {
-	if (connection)
 		delete connection;
 
 	connection = c;
--- trunk/KDE/kdenetwork/kopete/protocols/gadu/gaducommands.cpp #1228627:1228628
@@ -100,15 +100,11 @@
 void
 GaduCommand::deleteNotifiers()
 {
-	if ( read_ ) {
 		delete read_;
 		read_ = NULL;
-	}
-	if ( write_ ) {
 		delete write_;
 		write_ = NULL;
 	}
-}
 
 void
 GaduCommand::forwarder()
--- trunk/KDE/kdenetwork/kopete/protocols/gadu/gadudcc.cpp #1228627:1228628
@@ -89,11 +89,9 @@
 	if ( --referenceCount <= 0 ) {
 		kDebug(14100) << "closing dcc socket";
 		referenceCount = 0;
-		if ( dccServer ) {
 			delete dccServer;
 			dccServer = NULL;
 		}
-	}
 	kDebug(14100)  << "reference count " << referenceCount;
 	initmutex.unlock();
 
--- trunk/KDE/kdenetwork/kopete/protocols/gadu/gadudccserver.cpp #1228627:1228628
@@ -98,15 +98,11 @@
 GaduDCCServer::destroyNotifiers()
 {
 	disableNotifiers();
-	if ( read_ ) {
 		delete read_;
 		read_ = NULL;
-	}
-	if ( write_ ) {
 		delete write_;
 		write_ = NULL;
 	}
-}
 
 void
 GaduDCCServer::createNotifiers( bool connect )
--- trunk/KDE/kdenetwork/kopete/protocols/gadu/gadudcctransaction.cpp \
#1228627:1228628 @@ -173,15 +173,11 @@
 GaduDCCTransaction::destroyNotifiers()
 {
 	disableNotifiers();
-	if ( read_ ) {
 		delete read_;
 		read_ = NULL;
-	}
-	if ( write_ ) {
 		delete write_;
 		write_ = NULL;
 	}
-}
 
 void
 GaduDCCTransaction::createNotifiers( bool connect )
--- trunk/KDE/kdenetwork/kopete/protocols/gadu/gadusession.cpp #1228627:1228628
@@ -100,15 +100,11 @@
 GaduSession::destroyNotifiers()
 {
 	disableNotifiers();
-	if ( read_ ) {
 		delete read_;
 		read_ = NULL;
-	}
-	if ( write_ ) {
 		delete write_;
 		write_ = NULL;
 	}
-}
 
 void
 GaduSession::createNotifiers( bool connect )
--- trunk/KDE/kdenetwork/kopete/protocols/irc/libkirc/plugins/ctcp/kirctransferserver.cpp \
#1228627:1228628 @@ -60,7 +60,6 @@
 
 TransferServer::~TransferServer()
 {
-	if (m_socket)
 		delete m_socket;
 }
 
--- trunk/KDE/kdenetwork/kopete/protocols/jabber/jingle/mediamanager.cpp \
#1228627:1228628 @@ -85,17 +85,11 @@
 
 void MediaManager::stop()
 {
-	if (d->alsaIn)
-	{
 		delete d->alsaIn;
 		d->alsaIn = 0;
-	}
 	
-	if (d->alsaOut)
-	{
 		delete d->alsaOut;
 		d->alsaOut = 0;
-	}
 
 	d->started = false;
 }
--- trunk/KDE/kdenetwork/kopete/protocols/wlm/wlmaccount.cpp #1228627:1228628
@@ -1389,16 +1389,10 @@
         c->setOnlineStatus (WlmProtocol::protocol ()->wlmOffline);
     }
 
-    if (m_transferManager)
-    {
         delete m_transferManager;
         m_transferManager = NULL;
-    }
-    if (m_chatManager)
-    {
         delete m_chatManager;
         m_chatManager = NULL;
-    }
     if (m_server)
     {
         QObject::disconnect (&m_server->cb, 0, 0, 0);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic