1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-04 13:17:34 +02:00

Don't think two SipInfos are equal just because they are both invalid ... stupid assumptions are stupid

This commit is contained in:
Dominik Schmidt
2013-01-16 02:29:56 +01:00
parent 438cb1b39b
commit f292bb28d9

View File

@@ -253,11 +253,7 @@ operator<< ( QDebug dbg, const SipInfo& info )
bool operator==( const SipInfo& one, const SipInfo& two ) bool operator==( const SipInfo& one, const SipInfo& two )
{ {
// check valid/invalid combinations first, so we don't try to access any invalid sipInfos (->assert) // check valid/invalid combinations first, so we don't try to access any invalid sipInfos (->assert)
if ( !one.isValid() && !two.isValid() ) if ( ( one.isValid() && !two.isValid() ) || ( !one.isValid() && two.isValid() ) )
{
return true;
}
else if ( ( one.isValid() && !two.isValid() ) || ( !one.isValid() && two.isValid() ) )
{ {
return false; return false;
} }