1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Fix possible crash due to saving invalid qvariants

This commit is contained in:
Jeff Mitchell 2012-06-15 14:32:01 -04:00
parent 7f2f7d642b
commit 805a942cf6

@ -264,7 +264,9 @@ ACLRegistry::save()
foreach ( ACLRegistry::User user, m_cache )
{
tDebug() << Q_FUNC_INFO << "user is " << user.uuid << " with known name " << user.knownAccountIds.first();
entryList.append( QVariant::fromValue< ACLRegistry::User >( user ) );
QVariant val = QVariant::fromValue< ACLRegistry::User >( user );
if ( val.isValid() )
entryList.append( val );
}
TomahawkSettings::instance()->setAclEntries( entryList );
}