1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 13:47:26 +02:00

Fix: Called C++ object pointer is null

We already have a != NULL check in the next line, we should use it then.
This commit is contained in:
Uwe L. Korn
2014-07-06 18:00:10 +01:00
parent 1487d5d7f3
commit ad54e6919d

View File

@@ -220,10 +220,10 @@ ConnectionManager::connectToPeer( const Tomahawk::peerinfo_ptr &peerInfo, bool l
{ {
// We are already connected to this peer, so just add some more details. // We are already connected to this peer, so just add some more details.
peerInfoDebug( peerInfo ) << "Existing connection found, not connecting."; peerInfoDebug( peerInfo ) << "Existing connection found, not connecting.";
cconn->addPeerInfo( peerInfo );
if ( cconn != NULL ) if ( cconn != NULL )
{ {
d_func()->controlConnection = QPointer<ControlConnection>(cconn); cconn->addPeerInfo( peerInfo );
d_func()->controlConnection = QPointer<ControlConnection>( cconn );
} }
deactivate(); deactivate();
return; return;