Skip to content
Snippets Groups Projects
Commit 2d0ccfc9 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Ensure we get at least one item before passing to the callback

Should fix ASan "crash".
parent 2ddfb79d
No related branches found
No related tags found
No related merge requests found
...@@ -1538,7 +1538,7 @@ net_wm_state_is_cb(bool (*cb)(Atom)) ...@@ -1538,7 +1538,7 @@ net_wm_state_is_cb(bool (*cb)(Atom))
break; break;
} }
ret = (Atom *)prop; ret = (Atom *)prop;
if (cb(*ret)) if (nir > 0 && cb(*ret))
is = true; is = true;
x11.XFree(prop); x11.XFree(prop);
if (is) if (is)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment