volume: avoid NULL dereference in onval() on sndio device switch - slstatus - status monitor
HTML git clone git://git.suckless.org/slstatus
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit 6fa36bad9f74154d4bf3be834ada93e04bf737e1
DIR parent 8723e8b8c69c08bae8abe02ea1f4a49758b8bdfc
HTML Author: Chris Billington <emulti@disroot.org>
Date: Fri, 21 Nov 2025 12:31:40 +0800
volume: avoid NULL dereference in onval() on sndio device switch
Diffstat:
M components/volume.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
DIR diff --git a/components/volume.c b/components/volume.c
@@ -89,6 +89,8 @@
if (c->addr == addr)
break;
}
+ if (c == NULL)
+ return;
c->val = val;
}