mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 16:02:07 +02:00
Don't crash in headless mode if there's an account error
This commit is contained in:
parent
d9445378b9
commit
e964bf8efd
@ -510,13 +510,19 @@ AccountManager::onError( int code, const QString& msg )
|
||||
if ( code == Account::AuthError )
|
||||
{
|
||||
statusMessage = new SipStatusMessage( SipStatusMessage::SipLoginFailure, account->accountFriendlyName() );
|
||||
JobStatusView::instance()->model()->addJob( statusMessage );
|
||||
if ( !TomahawkUtils::headless() )
|
||||
{
|
||||
JobStatusView::instance()->model()->addJob( statusMessage );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
statusMessage = new SipStatusMessage(SipStatusMessage::SipConnectionFailure, account->accountFriendlyName(), msg );
|
||||
JobStatusView::instance()->model()->addJob( statusMessage );
|
||||
QTimer::singleShot( 10000, account, SLOT( authenticate() ) );
|
||||
if ( !TomahawkUtils::headless() )
|
||||
{
|
||||
statusMessage = new SipStatusMessage(SipStatusMessage::SipConnectionFailure, account->accountFriendlyName(), msg );
|
||||
JobStatusView::instance()->model()->addJob( statusMessage );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user