Skip to content

Commit

Permalink
Log errors during incorrect music playback (#4168)
Browse files Browse the repository at this point in the history
  • Loading branch information
trofi authored Sep 5, 2021
1 parent 84c09b4 commit 91f9899
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/engine/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,12 @@ void Music::Play( const std::vector<uint8_t> & v, const bool loop )
#endif
SDL_FreeRW( rwops );

PlayMusic( mix, loop );
if ( !mix ) {
ERROR_LOG( Mix_GetError() );
}
else {
PlayMusic( mix, loop );
}
}
}

Expand Down

0 comments on commit 91f9899

Please sign in to comment.