Skip to content

Commit

Permalink
AudioStream: Only Unload() if it's ready
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach committed Feb 26, 2024
1 parent f790a20 commit 2892464
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 2892464

Please sign in to comment.