mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-25 06:46:36 -04:00
wayl_destroy: early return on NULL
This commit is contained in:
parent
251cf98388
commit
6314de554d
1 changed files with 3 additions and 0 deletions
|
|
@ -541,6 +541,9 @@ out:
|
||||||
void
|
void
|
||||||
wayl_destroy(struct wayland *wayl)
|
wayl_destroy(struct wayland *wayl)
|
||||||
{
|
{
|
||||||
|
if (wayl == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
if (wayl->kbd.repeat.fd != 0) {
|
if (wayl->kbd.repeat.fd != 0) {
|
||||||
fdm_del(wayl->fdm, wayl->kbd.repeat.fd);
|
fdm_del(wayl->fdm, wayl->kbd.repeat.fd);
|
||||||
close(wayl->kbd.repeat.fd);
|
close(wayl->kbd.repeat.fd);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue