fix segfault on exit

This commit is contained in:
Martin Rotter 2018-05-28 20:13:17 +02:00
parent dabbe14b88
commit b92171255e
2 changed files with 8 additions and 6 deletions

@ -1 +1 @@
Subproject commit 4a01edaec7d67d3b2ae81aeea2a3c876216fbab8
Subproject commit ae7084718c41afc01919779e58cd449e0eebd401

View File

@ -225,13 +225,15 @@ void FeedReader::quit() {
}
// Stop running updates.
m_feedDownloader->stopRunningUpdate();
if (m_feedDownloader != nullptr) {
m_feedDownloader->stopRunningUpdate();
if (m_feedDownloader->isUpdateRunning()) {
QEventLoop loop(this);
if (m_feedDownloader->isUpdateRunning()) {
QEventLoop loop(this);
connect(m_feedDownloader, &FeedDownloader::updateFinished, &loop, &QEventLoop::quit);
loop.exec();
connect(m_feedDownloader, &FeedDownloader::updateFinished, &loop, &QEventLoop::quit);
loop.exec();
}
}
if (m_dbCleanerThread != nullptr && m_dbCleanerThread->isRunning()) {