Skip to content

Commit

Permalink
See if this fixes lfranchi's assert
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferai committed Jun 21, 2012
1 parent f8ea066 commit e6af7b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libtomahawk/database/DatabaseImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,9 @@ DatabaseImpl::artistId( const QString& name_orig, bool autoCreate )
int id = 0;
QString sortname = DatabaseImpl::sortname( name_orig );

QString queryString = QString( "SELECT id FROM artist WHERE sortname = %1" ).arg( sortname );
TomahawkSqlQuery query = newquery();
query.prepare( "SELECT id FROM artist WHERE sortname = ?" );
query.addBindValue( sortname );
query.exec();
query.exec( queryString );
if ( query.next() )
{
id = query.value( 0 ).toInt();
Expand Down

0 comments on commit e6af7b0

Please sign in to comment.