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>
This commit is contained in:
Sebastian Wick 2024-07-26 16:35:15 +02:00 committed by Sebastian Wick
parent 0cecde304f
commit f6f0a3cdec

View file

@ -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)) {