You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
[Audio] Prevent crash in interactive playback
This commit is contained in:
@@ -976,6 +976,8 @@ void AudioStreamPlaybackInteractive::switch_to_clip_by_name(const StringName &p_
|
||||
return;
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_MSG(stream.is_null(), "Attempted to switch while not playing back any stream.");
|
||||
|
||||
for (int i = 0; i < stream->get_clip_count(); i++) {
|
||||
if (stream->get_clip_name(i) == p_name) {
|
||||
switch_request = i;
|
||||
|
||||
Reference in New Issue
Block a user