diff --git a/src/libtomahawk/database/DatabaseCommand_AllTracks.cpp b/src/libtomahawk/database/DatabaseCommand_AllTracks.cpp index 7f548533f0..3341e94f5a 100644 --- a/src/libtomahawk/database/DatabaseCommand_AllTracks.cpp +++ b/src/libtomahawk/database/DatabaseCommand_AllTracks.cpp @@ -142,12 +142,16 @@ DatabaseCommand_AllTracks::exec( DatabaseImpl* dbi ) artist, track, album, duration, composer, albumpos, discnumber ); + if ( !t ) + continue; - if ( m_album || m_artist ) { + if ( m_album || m_artist ) t->loadAttributes(); - } Tomahawk::result_ptr result = Tomahawk::Result::get( url, t ); + if ( !result ) + continue; + result->setSize( size ); result->setBitrate( bitrate ); result->setModificationTime( modificationTime );