mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 05:37:29 +02:00
* Fixed accessing invalid query in DbCmd_PlaybackHistory.
This commit is contained in:
@@ -49,7 +49,7 @@ DatabaseCommand_PlaybackHistory::exec( DatabaseImpl* dbi )
|
|||||||
query.prepare( sql );
|
query.prepare( sql );
|
||||||
query.exec();
|
query.exec();
|
||||||
|
|
||||||
while( query.next() )
|
while ( query.next() )
|
||||||
{
|
{
|
||||||
TomahawkSqlQuery query_track = dbi->newquery();
|
TomahawkSqlQuery query_track = dbi->newquery();
|
||||||
|
|
||||||
@@ -66,6 +66,8 @@ DatabaseCommand_PlaybackHistory::exec( DatabaseImpl* dbi )
|
|||||||
if ( query_track.next() )
|
if ( query_track.next() )
|
||||||
{
|
{
|
||||||
Tomahawk::query_ptr q = Tomahawk::Query::get( query_track.value( 1 ).toString(), query_track.value( 0 ).toString(), QString() );
|
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 )
|
if ( query.value( 3 ).toUInt() == 0 )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user