1
0
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:
Uwe L. Korn
2013-07-29 23:55:07 +02:00
parent 526c492409
commit 251fa024c4

View File

@@ -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
}