tablet+libinput: do not crash if there's a tablet event without a client

It triggers if you start with your pen on the tablet while starting
kwin.
This commit is contained in:
Aleix Pol 2021-07-02 20:55:51 +02:00
parent c8a37ef27f
commit 8386a8bb66

View file

@ -571,6 +571,7 @@ void Connection::processEvents()
break;
}
if (workspace()) {
#ifndef KWIN_BUILD_TESTING
auto client = workspace()->activeClient();
const auto *output = static_cast<AbstractWaylandOutput*>(
@ -585,6 +586,7 @@ void Connection::processEvents()
globalPos, tte->pressure(),
tte->xTilt(), tte->yTilt(), tte->rotation(),
tte->isTipDown(), tte->isNearby(), createTabletId(tte->tool(), event->device()->groupUserData()), tte->time());
}
break;
}
case LIBINPUT_EVENT_TABLET_TOOL_BUTTON: {