aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2019-07-13 17:33:49 -0400
committerManuel Stoeckl <code@mstoeckl.com>2019-09-10 07:59:50 -0400
commit6265dd4f071f1c99f3b349695ef5ede8d0697a15 (patch)
tree5af02ec3eeb40928172e6f9203bf729f6bffb366 /src
parentprotocol: invalid_method is sent on malformed request (diff)
downloadwayland-6265dd4f071f1c99f3b349695ef5ede8d0697a15.tar
wayland-6265dd4f071f1c99f3b349695ef5ede8d0697a15.tar.gz
wayland-6265dd4f071f1c99f3b349695ef5ede8d0697a15.tar.bz2
wayland-6265dd4f071f1c99f3b349695ef5ede8d0697a15.tar.lz
wayland-6265dd4f071f1c99f3b349695ef5ede8d0697a15.tar.xz
wayland-6265dd4f071f1c99f3b349695ef5ede8d0697a15.tar.zst
wayland-6265dd4f071f1c99f3b349695ef5ede8d0697a15.zip
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>
Diffstat (limited to 'src')
-rw-r--r--src/wayland-client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c
index ed50281..7c93c7b 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -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));