mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-13 20:39:57 +01:00
Return empty nodeId if we have none
This commit is contained in:
parent
c73be4d9ac
commit
dd4e2916c8
@ -232,9 +232,16 @@ PeerInfo::contactId() const
|
||||
const QString
|
||||
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
|
||||
return d_func()->sipInfos.first().nodeId();
|
||||
return d->sipInfos.first().nodeId();
|
||||
}
|
||||
|
||||
const QString
|
||||
|
Loading…
x
Reference in New Issue
Block a user