From 1793f59aa01279510b079ce47dc960f99c5753ae Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Mon, 31 Jul 2023 10:59:05 +0200 Subject: Don't attempt to use an unavailable cubeb_stream in aaudio_stream_init. --- src/cubeb_aaudio.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/cubeb_aaudio.cpp b/src/cubeb_aaudio.cpp index c86dac7..4b7774e 100644 --- a/src/cubeb_aaudio.cpp +++ b/src/cubeb_aaudio.cpp @@ -1228,13 +1228,12 @@ aaudio_stream_init(cubeb * ctx, cubeb_stream ** stream, break; } - stm->in_use.store(true); - if (!stm) { LOG("Error: maximum number of streams reached"); return CUBEB_ERROR; } + stm->in_use.store(true); stm->context = ctx; stm->user_ptr = user_ptr; stm->data_callback = data_callback; -- cgit v1.2.3