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:
@@ -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();
|
||||||
|
Reference in New Issue
Block a user