Commit 2063e169 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix an assert in KisStroke::cancelStroke()

LodN strokes can have an uncancellable jobs ('suspend'), and not
be started yet. This is a normal situation.

Fixes T2287
BUG:361682
parent 7ff525c2
......@@ -144,11 +144,17 @@ void KisStroke::cancelStroke()
if(!m_strokeInitialized) {
/**
* FIXME: this assert is probably a bit too optimistic,
* because the LODN stroke that suspends the other one
* can be easily non-initialized
* Lod0 stroke cannot be suspended and !initialized at the
* same time, because the suspend job is created iff the
* stroke has already done some meaningful work.
*
* At the same time, LodN stroke can be prepended with a
* 'suspend' job even when it has not been started yet. That
* is obvious: we should suspend the other stroke before doing
* anything else.
*/
KIS_ASSERT_RECOVER_NOOP(sanityCheckAllJobsAreCancellable());
KIS_ASSERT_RECOVER_NOOP(type() == LODN ||
sanityCheckAllJobsAreCancellable());
clearQueueOnCancel();
}
else if(m_strokeInitialized &&
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment