Explorar o código

-Fixed bug with event player crashing, closes #3687

Juan Linietsky %!s(int64=9) %!d(string=hai) anos
pai
achega
c04a9ff751
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      scene/audio/event_player.cpp

+ 2 - 0
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()) {