Pattern weston_head_from_resource(output_resource)->output is not safe
There are many instances of weston_head_from_resource(output_resource)->output
in the code base, literally. This construct is not safe, because the weston_head
can be NULL
.
If a client is sending a request with a wl_output
argument at the same time as the compositor is disabling the corresponding weston_output
, the user data of wl_resource
for the wl_output
s is set to NULL
.
These would need to be fixed. Found by code inspection.