From c5c418de035913dc34f4842f7ba822b9ed165109 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Fri, 26 Jul 2024 16:35:15 +0200 Subject: [PATCH] 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 (cherry picked from commit f6f0a3cdec1c23c0adfe1deb9c53e8fdbb998ea4) --- src/wayland-client.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 9cf27939..ef305c32 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -921,10 +921,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)) {