From 63d573be73e5574f450d84686788fbbd4fa80c6c Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 28 Mar 2017 11:50:30 +0200 Subject: Guard against destruction We really need to guard against this in kasync... --- common/changereplay.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common/changereplay.cpp') diff --git a/common/changereplay.cpp b/common/changereplay.cpp index 532cca8..4870551 100644 --- a/common/changereplay.cpp +++ b/common/changereplay.cpp @@ -99,6 +99,9 @@ KAsync::Job ChangeReplay::replayNextRevision() SinkTraceCtx(mLogCtx) << "Changereplay from " << *lastReplayedRevision << " to " << *topRevision; return KAsync::doWhile( [this, lastReplayedRevision, topRevision]() -> KAsync::Job { + if (!mGuard) { + return KAsync::value(KAsync::Break); + } if (*lastReplayedRevision >= *topRevision) { SinkTraceCtx(mLogCtx) << "Done replaying"; return KAsync::value(KAsync::Break); -- cgit v1.2.3