1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-22 08:52:12 +02:00

* Fixed accessing invalid query in DbCmd_PlaybackHistory.

This commit is contained in:
Christian Muehlhaeuser 2012-07-26 01:30:21 +02:00
parent 55fec99ce3
commit c45eec065d

View File

@ -49,7 +49,7 @@ DatabaseCommand_PlaybackHistory::exec( DatabaseImpl* dbi )
query.prepare( sql );
query.exec();
while( query.next() )
while ( query.next() )
{
TomahawkSqlQuery query_track = dbi->newquery();
@ -66,6 +66,8 @@ DatabaseCommand_PlaybackHistory::exec( DatabaseImpl* dbi )
if ( query_track.next() )
{
Tomahawk::query_ptr q = Tomahawk::Query::get( query_track.value( 1 ).toString(), query_track.value( 0 ).toString(), QString() );
if ( q.isNull() )
continue;
if ( query.value( 3 ).toUInt() == 0 )
{