From 6fa36bad9f74154d4bf3be834ada93e04bf737e1 Mon Sep 17 00:00:00 2001 From: Chris Billington Date: Fri, 21 Nov 2025 12:31:40 +0800 Subject: [PATCH] volume: avoid NULL dereference in onval() on sndio device switch --- components/volume.c | 2 ++ 1 file changed, 2 insertions(+) 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; }