Skip to content

Commit

Permalink
Always check return-value of Track's & Result's get() method.
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Oct 28, 2014
1 parent 1201b5b commit 6b8386d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/libtomahawk/database/DatabaseCommand_AllTracks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 6b8386d

Please sign in to comment.