From bd182f8bdc5997e64eb89dc78419b4e27ee566a4 Mon Sep 17 00:00:00 2001 From: YaoBing Xiao Date: Thu, 5 Mar 2026 21:02:31 +0800 Subject: [PATCH] wayland-client: make wl_proxy_destroy(NULL) a no-op Return early when the proxy argument is NULL so callers don't need to check before destroying. Signed-off-by: YaoBing Xiao --- src/wayland-client.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland-client.c b/src/wayland-client.c index 50b3b4b2..205227f2 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -624,6 +624,10 @@ wl_proxy_destroy_caller_locks(struct wl_proxy *proxy) WL_EXPORT void wl_proxy_destroy(struct wl_proxy *proxy) { + if (proxy == NULL) { + return; + } + struct wl_display *display = proxy->display; pthread_mutex_lock(&display->mutex);