Skip to content

Commit

Permalink
Fixed crash due to a missing null pointer check
Browse files Browse the repository at this point in the history
  • Loading branch information
WolverinDEV committed Apr 12, 2020
1 parent 7ef7ea7 commit 8e1ce32
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/ffmpeg/FFMpegMusicPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ void FFMpegMusicPlayer::spawn_stream() {

void FFMpegMusicPlayer::destroy_stream() {
auto old_stream = std::exchange(this->stream, nullptr);
if(!old_stream) return;

old_stream->callback_info_initialized = nullptr;
old_stream->callback_ended = nullptr;
old_stream->callback_abort = nullptr;
Expand Down

0 comments on commit 8e1ce32

Please sign in to comment.