scanner: add NULL checks to generated destroy stubs

Signed-off-by: YaoBing Xiao <xiaoyaobing@uniontech.com>
This commit is contained in:
YaoBing Xiao 2026-03-05 21:18:48 +08:00
parent bd182f8bdc
commit e55fc1984b
5 changed files with 106 additions and 0 deletions

View file

@ -63,6 +63,10 @@ empty_get_version(struct empty *empty)
static inline void
empty_destroy(struct empty *empty)
{
if (empty == NULL) {
return;
}
wl_proxy_destroy((struct wl_proxy *) empty);
}