Commit fd09bcfd authored by Thomas Guillem's avatar Thomas Guillem

mmdevice: fix assert/UB when changing volume without any devices

If there is no audio devices, Open() will succeed but MMSession() will fail.
Then, MMThread() will wait for any events in order to call MMSession() again.
In that case, don't try to call MMsession() without a valid device when volume
or mute is changed from the user.
parent 849fe102
......@@ -1037,7 +1037,7 @@ static void *MMThread(void *data)
if (FAILED(MMSession(aout, it)))
if (sys->requested_device == NULL || FAILED(MMSession(aout, it)))
SleepConditionVariableCS(&sys->work, &sys->lock, INFINITE);
while (sys->it != NULL);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment