From b92171255eb28fb7db8c26bab37d528c444a8669 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 28 May 2018 20:13:17 +0200 Subject: [PATCH] fix segfault on exit --- resources/binaries | 2 +- src/miscellaneous/feedreader.cpp | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/resources/binaries b/resources/binaries index 4a01edaec..ae7084718 160000 --- a/resources/binaries +++ b/resources/binaries @@ -1 +1 @@ -Subproject commit 4a01edaec7d67d3b2ae81aeea2a3c876216fbab8 +Subproject commit ae7084718c41afc01919779e58cd449e0eebd401 diff --git a/src/miscellaneous/feedreader.cpp b/src/miscellaneous/feedreader.cpp index 99bc7dfcc..6dc135e00 100755 --- a/src/miscellaneous/feedreader.cpp +++ b/src/miscellaneous/feedreader.cpp @@ -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()) {