mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
Fix possible crash due to saving invalid qvariants
This commit is contained in:
@@ -264,7 +264,9 @@ ACLRegistry::save()
|
|||||||
foreach ( ACLRegistry::User user, m_cache )
|
foreach ( ACLRegistry::User user, m_cache )
|
||||||
{
|
{
|
||||||
tDebug() << Q_FUNC_INFO << "user is " << user.uuid << " with known name " << user.knownAccountIds.first();
|
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 );
|
TomahawkSettings::instance()->setAclEntries( entryList );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user