volume: avoid NULL dereference in onval() on sndio device switch

This commit is contained in:
Chris Billington 2025-11-21 12:31:40 +08:00 committed by drkhsh
parent 8723e8b8c6
commit 6fa36bad9f

View File

@ -89,6 +89,8 @@
if (c->addr == addr)
break;
}
if (c == NULL)
return;
c->val = val;
}