Commit de8e1737 authored by Eoin O'Neill's avatar Eoin O'Neill 🍀

Hotfix for canvas crashing on closing when having more than one document open.

Let's make sure the canvas we're setting `null` is the right one, shall we? :)
This should solve the crash without reintroducing the soft-lock on graphics
acceleration changes.

BUG:424787


(cherry picked from commit 838a1292)
parent 5161f0fb
......@@ -473,7 +473,6 @@ bool KisInputManager::eventFilterImpl(QEvent * event)
d->allowMouseEvents();
d->touchHasBlockedPressEvents = false;
}
d->matcher.enterEvent();
break;
case QEvent::Leave:
......
......@@ -259,8 +259,10 @@ void KisInputManager::Private::CanvasSwitcher::removeCanvas(KisCanvas2 *canvas)
widget->removeEventFilter(this);
d->canvas = 0;
d->toolProxy = 0;
if (d->canvas == canvas) {
d->canvas = 0;
d->toolProxy = 0;
}
}
bool isInputWidget(QWidget *w)
......
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