mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-23 05:35:51 -04:00
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:
parent
e6aeed9816
commit
bd182f8bdc
1 changed files with 4 additions and 0 deletions
|
|
@ -624,6 +624,10 @@ wl_proxy_destroy_caller_locks(struct wl_proxy *proxy)
|
||||||
WL_EXPORT void
|
WL_EXPORT void
|
||||||
wl_proxy_destroy(struct wl_proxy *proxy)
|
wl_proxy_destroy(struct wl_proxy *proxy)
|
||||||
{
|
{
|
||||||
|
if (proxy == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
struct wl_display *display = proxy->display;
|
struct wl_display *display = proxy->display;
|
||||||
|
|
||||||
pthread_mutex_lock(&display->mutex);
|
pthread_mutex_lock(&display->mutex);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue