Skip to content

Commit

Permalink
Merge pull request #296 from RobLoach/audiostream-unload-fixes
Browse files Browse the repository at this point in the history
AudioStream: Only Unload() if it's ready
  • Loading branch information
RobLoach authored Feb 27, 2024
2 parents 39f8d34 + 2892464 commit 2869044
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/AudioStream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ class AudioStream : public ::AudioStream {
* Unload audio stream and free memory
*/
void Unload() {
::UnloadAudioStream(*this);
if (IsReady()) {
::UnloadAudioStream(*this);
}
}

/**
Expand Down

0 comments on commit 2869044

Please sign in to comment.