1
0
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:
Uwe L. Korn 2013-06-29 18:15:43 +02:00
parent c73be4d9ac
commit dd4e2916c8

View File

@ -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