1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-07 14:46:33 +02:00

don;t crash if username is null

This commit is contained in:
Leo Franchi
2012-05-01 20:53:17 -04:00
parent d30e5df23e
commit 04358fbafe

View File

@@ -791,7 +791,7 @@ LastFmPlugin::onAuthenticated()
void void
LastFmPlugin::createScrobbler() LastFmPlugin::createScrobbler()
{ {
if ( m_account.isNull() ) if ( m_account.isNull() || lastfm::ws::Username.isEmpty() )
return; return;
if ( m_account.data()->sessionKey().isEmpty() ) // no session key, so get one if ( m_account.data()->sessionKey().isEmpty() ) // no session key, so get one