diff --git a/scene/audio/event_player.cpp b/scene/audio/event_player.cpp index eabe84a8eee..f43c3c2a597 100644 --- a/scene/audio/event_player.cpp +++ b/scene/audio/event_player.cpp @@ -54,6 +54,8 @@ void EventPlayer::set_stream(const Ref &p_stream) { stream=p_stream; if (stream.is_valid()) playback=stream->instance_playback(); + else + playback.unref(); if (playback.is_valid()) {