xwayland: Avoid crash if processing keys after xwayland is disconnected
Whilst the XWayland input filter only runs whilst XWayland is running there is hypothetical window between the wayland connection to xwayland being disconnected and handleXwaylandFinished, the process exiting. This should be guarded correctly. BUG: 480925
This commit is contained in:
parent
8b843e647c
commit
79ef1be57b
1 changed files with 5 additions and 1 deletions
|
@ -382,9 +382,13 @@ public:
|
||||||
auto surface = keyboard->focusedSurface();
|
auto surface = keyboard->focusedSurface();
|
||||||
ClientConnection *xwaylandClient = waylandServer()->xWaylandConnection();
|
ClientConnection *xwaylandClient = waylandServer()->xWaylandConnection();
|
||||||
|
|
||||||
|
if (!xwaylandClient) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (surface) {
|
if (surface) {
|
||||||
ClientConnection *client = surface->client();
|
ClientConnection *client = surface->client();
|
||||||
if (xwaylandClient && xwaylandClient == client) {
|
if (xwaylandClient == client) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue