Skip to content

Commit

Permalink
Fix crash in AFP when playing with loop while no sample is loaded (#7266
Browse files Browse the repository at this point in the history
)
  • Loading branch information
khoidauminh authored and Rossmaxx committed May 21, 2024
1 parent b08401c commit 5bfa217
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/Sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ void Sample::setAllPointFrames(int startFrame, int endFrame, int loopStartFrame,

void Sample::playRaw(sampleFrame* dst, size_t numFrames, const PlaybackState* state, Loop loopMode) const
{
if (m_buffer->size() < 1) { return; }

auto index = state->m_frameIndex;
auto backwards = state->m_backwards;

Expand Down

0 comments on commit 5bfa217

Please sign in to comment.