mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-07 01:22:49 +02:00
See if this fixes lfranchi's assert
This commit is contained in:
parent
f8ea0667d4
commit
e6af7b03d7
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user