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 <xiaoyaobing@uniontech.com>
This commit is contained in:
YaoBing Xiao 2026-03-05 21:02:31 +08:00
parent e6aeed9816
commit bd182f8bdc

View file

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