diff options
-rw-r--r-- | scene/audio/event_player.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/audio/event_player.cpp b/scene/audio/event_player.cpp index eabe84a8ee..f43c3c2a59 100644 --- a/scene/audio/event_player.cpp +++ b/scene/audio/event_player.cpp @@ -54,6 +54,8 @@ void EventPlayer::set_stream(const Ref<EventStream> &p_stream) { stream=p_stream; if (stream.is_valid()) playback=stream->instance_playback(); + else + playback.unref(); if (playback.is_valid()) { |