diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-02-20 20:59:02 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-02-20 21:00:08 -0300 |
commit | c04a9ff75128aed07a408c7c6bc9d4027d716bd3 (patch) | |
tree | 9fafdff9681d0fa2828c90674ed8483bb3604e24 /scene/audio/event_player.cpp | |
parent | 1d04d55ac0fa42f889e73839d7bfaa9b389e2a14 (diff) |
-Fixed bug with event player crashing, closes #3687
Diffstat (limited to 'scene/audio/event_player.cpp')
-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()) { |