wlserver: explain why filter_global may need to handle NULL wlr_output
1. output plugged in, gamescope creates new wlr_output and sends a wl_registry.global event 2. client sees it, sends a wl_registry.bind request 3. output plugged out, gamescope sends a wl_registry.global_remove event and destroys the wlr_output 4. gamescope receives the wl_registry.bind request, but the wlr_output no longer exists 5. client receives the wl_registry.global_remove event
This commit is contained in:
parent
7b51f5964d
commit
6237c3452b
1 changed files with 2 additions and 2 deletions
|
@ -616,8 +616,8 @@ static bool filter_global(const struct wl_client *client, const struct wl_global
|
||||||
struct wlr_output *output = (struct wlr_output *) wl_global_get_user_data(global);
|
struct wlr_output *output = (struct wlr_output *) wl_global_get_user_data(global);
|
||||||
if (!output)
|
if (!output)
|
||||||
{
|
{
|
||||||
//assert(output);
|
/* Can happen if the output has been destroyed, but the client hasn't
|
||||||
wl_log.errorf("Global %p with interface %s had no userdata! Woah :(", global, wl_output_interface.name);
|
* received the wl_registry.global_remove event yet. */
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue