diff options
author | Paul Adenot <[email protected]> | 2023-07-31 10:59:05 +0200 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2023-07-31 11:02:27 +0200 |
commit | 1793f59aa01279510b079ce47dc960f99c5753ae (patch) | |
tree | 516d7ce6a6cee0a8a7e4eac9d8f3a65b561d949f | |
parent | 41344b3abb2822bc0ecf6c9bf482ed68a9435493 (diff) | |
download | cubeb-null-check.tar.gz cubeb-null-check.zip |
Don't attempt to use an unavailable cubeb_stream in aaudio_stream_init.null-check
-rw-r--r-- | src/cubeb_aaudio.cpp | 3 |
1 files changed, 1 insertions, 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; |