From 805a942cf627f0c9650c125103344491d66cfdff Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Fri, 15 Jun 2012 14:32:01 -0400 Subject: [PATCH] Fix possible crash due to saving invalid qvariants --- src/libtomahawk/AclRegistry.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/AclRegistry.cpp b/src/libtomahawk/AclRegistry.cpp index 2adbe3683..7330d0468 100644 --- a/src/libtomahawk/AclRegistry.cpp +++ b/src/libtomahawk/AclRegistry.cpp @@ -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 ); }