1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 06:36:55 +02:00

* Don't access playlist data before it's loaded in ShortLinkHelper::shortLink().

This commit is contained in:
Christian Muehlhaeuser
2013-09-05 12:06:29 +02:00
parent df66559137
commit 84a47cc251

View File

@@ -55,6 +55,17 @@ ShortLinkHelper::shortLink( const Tomahawk::playlist_ptr& pl )
return; return;
} }
if ( !pl->loaded() )
{
pl->loadRevision();
}
if ( pl->busy() || !pl->loaded() )
{
NewClosure( pl.data(), SIGNAL( revisionLoaded( Tomahawk::PlaylistRevision ) ),
this, SLOT( shortLink( Tomahawk::playlist_ptr ) ), pl );
return;
}
QVariantMap m; QVariantMap m;
m[ "title" ] = pl->title(); m[ "title" ] = pl->title();
m[ "creator" ] = pl->author().isNull() ? "" : pl->author()->friendlyName(); m[ "creator" ] = pl->author().isNull() ? "" : pl->author()->friendlyName();