From 66199a99dca9a1be6fcd522613c8a4175951f11d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 14 Feb 2017 00:06:05 +0100 Subject: Avoid crashing if we get too many notifications. If notifications come in faster than we can process them we'd run into the assert. --- common/queryrunner.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/queryrunner.cpp b/common/queryrunner.cpp index 40880eb..1b142c8 100644 --- a/common/queryrunner.cpp +++ b/common/queryrunner.cpp @@ -120,6 +120,10 @@ QueryRunner::QueryRunner(const Sink::Query &query, const Sink::Resou fetcher({}); return KAsync::null(); } + if (mQueryInProgress) { + //Can happen if the revision come in quicker than we process them. + return KAsync::null(); + } Q_ASSERT(!mQueryInProgress); return KAsync::syncStart([&] { mQueryInProgress = true; -- cgit v1.2.3