mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 22:26:32 +02:00
* Don't access playlist data before it's loaded in ShortLinkHelper::shortLink().
This commit is contained in:
@@ -55,6 +55,17 @@ ShortLinkHelper::shortLink( const Tomahawk::playlist_ptr& pl )
|
||||
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;
|
||||
m[ "title" ] = pl->title();
|
||||
m[ "creator" ] = pl->author().isNull() ? "" : pl->author()->friendlyName();
|
||||
|
Reference in New Issue
Block a user