mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Fix: Called C++ object pointer is null
This branch is very unlikely to happen but ensuring non-null ControlConnection will save us maybe from a very unlikely crash.
This commit is contained in:
@@ -813,7 +813,9 @@ Servent::createParallelConnection( Connection* orig_conn, Connection* new_conn,
|
|||||||
m.insert( "offer", key );
|
m.insert( "offer", key );
|
||||||
m.insert( "controlid", Database::instance()->impl()->dbid() );
|
m.insert( "controlid", Database::instance()->impl()->dbid() );
|
||||||
|
|
||||||
orig_conn->sendMsg( Msg::factory( TomahawkUtils::toJson( m ), Msg::JSON ) );
|
if (orig_conn) {
|
||||||
|
orig_conn->sendMsg( Msg::factory( TomahawkUtils::toJson( m ), Msg::JSON ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user