mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
client: Ignore new requests if display has a fatal error
Once there has been a fatal display error, any new object requests potentially rely on invalid state. (For example, a failure to read from the compositor could hide a important event.) The safest way to handle the new requests is not to make them. Proxies produced by the request are still created, to ensure that any code using the library does not crash from an unexpected NULL pointer. Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
This commit is contained in:
parent
4c2b737561
commit
6265dd4f07
1 changed files with 4 additions and 0 deletions
|
|
@ -740,6 +740,10 @@ wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy,
|
|||
goto err_unlock;
|
||||
}
|
||||
|
||||
if (proxy->display->last_error) {
|
||||
goto err_unlock;
|
||||
}
|
||||
|
||||
closure = wl_closure_marshal(&proxy->object, opcode, args, message);
|
||||
if (closure == NULL)
|
||||
wl_abort("Error marshalling request: %s\n", strerror(errno));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue