wayl_destroy: early return on NULL

This commit is contained in:
Daniel Eklöf 2019-10-27 19:16:25 +01:00
parent 251cf98388
commit 6314de554d
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -541,6 +541,9 @@ out:
void
wayl_destroy(struct wayland *wayl)
{
if (wayl == NULL)
return;
if (wayl->kbd.repeat.fd != 0) {
fdm_del(wayl->fdm, wayl->kbd.repeat.fd);
close(wayl->kbd.repeat.fd);