diff options
Diffstat (limited to 'sys/dev/sound/pcm/mixer.c')
-rw-r--r-- | sys/dev/sound/pcm/mixer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index b0c2176..b7b5032 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -940,7 +940,8 @@ mixer_oss_mixerinfo(struct cdev *i_dev, oss_mixerinfo *mi) * There's a 1:1 relationship between mixers and PCM devices, so * begin by iterating over PCM devices and search for our mixer. */ - for (i = 0; i < devclass_get_maxunit(pcm_devclass); i++) { + for (i = 0; pcm_devclass != NULL && + i < devclass_get_maxunit(pcm_devclass); i++) { d = devclass_get_softc(pcm_devclass, i); if (d == NULL) continue; |