Browse files

* Add Artist to hash even without a valid db-id.

  • Loading branch information...
1 parent 20b73b4 commit 60f4263200379475c0776de88076bdfe41b105fd @muesli muesli committed Nov 14, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/libtomahawk/Artist.cpp
View
3 src/libtomahawk/Artist.cpp
@@ -95,9 +95,9 @@ Artist::get( unsigned int id, const QString& name )
artist_ptr a = artist_ptr( new Artist( id, name ), &QObject::deleteLater );
a->setWeakRef( a.toWeakRef() );
+ s_artistsByName.insert( name, a );
if ( id > 0 )
{
- s_artistsByName.insert( name, a );
s_artistsById.insert( id, a );
}
@@ -283,6 +283,7 @@ Artist::id() const
if ( m_id > 0 )
s_artistsById[ m_id ] = m_ownRef.toStrongRef();
+
s_idMutex.unlock();
}

0 comments on commit 60f4263

Please sign in to comment.