From: Chris Billington Date: Fri, 21 Nov 2025 04:31:40 +0000 (+0800) Subject: volume: avoid NULL dereference in onval() on sndio device switch X-Git-Url: http://git.skullheadx.com/tech/openbsd_html_css/static/about.html?a=commitdiff_plain;h=6fa36bad9f74154d4bf3be834ada93e04bf737e1;p=slstatus.git volume: avoid NULL dereference in onval() on sndio device switch --- diff --git a/components/volume.c b/components/volume.c index 6cec556..5a2bfb7 100644 --- a/components/volume.c +++ b/components/volume.c @@ -89,6 +89,8 @@ if (c->addr == addr) break; } + if (c == NULL) + return; c->val = val; }