mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-15 10:33:59 +02:00
Only add job if there is already a JobStatusView
This commit is contained in:
@@ -44,7 +44,9 @@ DatabaseCommand_UpdateSearchIndex::DatabaseCommand_UpdateSearchIndex()
|
||||
tLog() << Q_FUNC_INFO << "Updating index.";
|
||||
|
||||
#ifndef ENABLE_HEADLESS
|
||||
JobStatusView::instance()->model()->addJob( m_statusJob.data() );
|
||||
JobStatusView* jobStatusView = JobStatusView::instance();
|
||||
if ( jobStatusView != NULL )
|
||||
jobStatusView->model()->addJob( m_statusJob.data() );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user