mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
Return empty nodeId if we have none
This commit is contained in:
@@ -232,9 +232,16 @@ PeerInfo::contactId() const
|
|||||||
const QString
|
const QString
|
||||||
PeerInfo::nodeId() const
|
PeerInfo::nodeId() const
|
||||||
{
|
{
|
||||||
Q_ASSERT( !d_func()->sipInfos.isEmpty() );
|
Q_D( const PeerInfo );
|
||||||
|
|
||||||
|
if ( d->sipInfos.isEmpty() )
|
||||||
|
{
|
||||||
|
// Return an empty nodeId if we have not yet received the acutal nodeId.
|
||||||
|
return QString();
|
||||||
|
}
|
||||||
|
|
||||||
// All sip infos share the same nodeId
|
// All sip infos share the same nodeId
|
||||||
return d_func()->sipInfos.first().nodeId();
|
return d->sipInfos.first().nodeId();
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString
|
const QString
|
||||||
|
Reference in New Issue
Block a user