Fix crash in AFP when playing with loop while no sample is loaded (#7266)

This commit is contained in:
Pascal
2024-05-19 05:40:29 +07:00
committed by GitHub
parent f891bb30eb
commit 0ee05f5ad8

View File

@@ -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;