mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 08:52:12 +02:00
TWK-762: Don't crash when exiting during indexing
This commit is contained in:
parent
83a35fe3aa
commit
a80db298c0
src/libtomahawk/database
@ -34,13 +34,14 @@ DatabaseCommand_UpdateSearchIndex::DatabaseCommand_UpdateSearchIndex()
|
||||
{
|
||||
tLog() << Q_FUNC_INFO << "Updating index.";
|
||||
|
||||
JobStatusView::instance()->model()->addJob( m_statusJob );
|
||||
JobStatusView::instance()->model()->addJob( m_statusJob.data() );
|
||||
}
|
||||
|
||||
|
||||
DatabaseCommand_UpdateSearchIndex::~DatabaseCommand_UpdateSearchIndex()
|
||||
{
|
||||
m_statusJob->done();
|
||||
if (! m_statusJob.isNull() )
|
||||
m_statusJob.data()->done();
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
virtual void exec( DatabaseImpl* db );
|
||||
|
||||
private:
|
||||
IndexingJobItem* m_statusJob;
|
||||
QWeakPointer<IndexingJobItem> m_statusJob;
|
||||
};
|
||||
|
||||
#endif // DATABASECOMMAND_UPDATESEARCHINDEX_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user