1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-04-21 16:31:58 +02:00

Don't access NULL pointers which we are reporting failure on

This commit is contained in:
Uwe L. Korn 2014-06-27 17:46:01 +01:00
parent 2e6b6d354f
commit 1e6aacfc7e

View File

@ -74,7 +74,13 @@ ScriptCommand_AllTracks::exec()
void
ScriptCommand_AllTracks::reportFailure()
{
tDebug() << Q_FUNC_INFO << "for collection" << m_collection->name() << " artist" << m_album->artist()->name() << " album" << m_album->name();
if ( m_album && m_collection )
tDebug() << Q_FUNC_INFO << "for collection" << m_collection->name() << " artist" << m_album->artist()->name() << " album" << m_album->name();
else if ( m_collection )
tDebug() << Q_FUNC_INFO << "for collection" << m_collection->name() << " (no more information available)";
else
tDebug() << Q_FUNC_INFO;
emit tracks( QList< Tomahawk::query_ptr >() );
emit done();
}