Skip to content

Prevent NULL dereference in tablet_tool handler

Simon Ser requested to merge github/fork/Ongy/roots-1536 into master

Created by: Ongy

In case a tool was removed, but not yet destroyed by the client, the tool_client's tool can be NULL. We have to check that as well in the set_cursor handler to prevent using inert resources

Should fix https://github.com/swaywm/wlroots/issues/1536#issuecomment-463971534

This probably only ever happens with tablets that don't track unique tools (or maybe on unplug?), so I can't test this well. @wsinnema please test this for me, I can't reproduce it with my hardware.

Merge request reports