aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Wick <sebastian.wick@redhat.com>2024-07-26 16:35:15 +0200
committerSebastian Wick <sebastian@sebastianwick.net>2024-07-26 18:33:28 +0200
commitf6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4 (patch)
treed1190b74ff1d31843ce16129020078941beb2576
parentsrc: switch asserts to wl_abort (diff)
downloadwayland-f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4.tar
wayland-f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4.tar.gz
wayland-f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4.tar.bz2
wayland-f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4.tar.lz
wayland-f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4.tar.xz
wayland-f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4.tar.zst
wayland-f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4.zip
client: Handle proxies with no queue
wl_proxy_get_queue can return NULL if the queue of the proxy was already destroyed with wl_event_queue_destroy. In this case, the queue also has no name anymore. Fixes: b42218f ("client: Allow setting names for queues") Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
-rw-r--r--src/wayland-client.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c
index db5bcb5..a2c9ad9 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -924,10 +924,14 @@ wl_proxy_marshal_array_flags(struct wl_proxy *proxy, uint32_t opcode,
if (debug_client) {
struct wl_event_queue *queue;
+ const char *queue_name = NULL;
queue = wl_proxy_get_queue(proxy);
+ if (queue)
+ queue_name = wl_event_queue_get_name(queue);
+
wl_closure_print(closure, &proxy->object, true, false, NULL,
- wl_event_queue_get_name(queue));
+ queue_name);
}
if (wl_closure_send(closure, proxy->display->connection)) {