Browse Source

Fix AudioServer Crash when bus count equals 0

(cherry picked from commit ccc375f16334d0eb8d56d5e5f2b248ef1ee55258)
Maganty Rushyendra 4 years ago
parent
commit
c5e8a81737
1 changed files with 1 additions and 0 deletions
  1. 1 0
      servers/audio_server.cpp

+ 1 - 0
servers/audio_server.cpp

@@ -246,6 +246,7 @@ void AudioServer::_driver_process(int p_frames, int32_t *p_buffer) {
 		init_channels_and_buffers();
 		init_channels_and_buffers();
 	}
 	}
 
 
+	ERR_FAIL_COND_MSG(buses.empty() && todo, "AudioServer bus count is less than 1.");
 	while (todo) {
 	while (todo) {
 
 
 		if (to_mix == 0) {
 		if (to_mix == 0) {