Guard the voice stealing iif voices are empty
This commit is contained in:
parent
2cdf4f165f
commit
f318c528a2
1 changed files with 3 additions and 0 deletions
|
|
@ -7,6 +7,9 @@ sfz::VoiceStealing::VoiceStealing()
|
|||
|
||||
sfz::Voice* sfz::VoiceStealing::steal(absl::Span<sfz::Voice*> voices) noexcept
|
||||
{
|
||||
if (voices.empty())
|
||||
return {};
|
||||
|
||||
// Start of the voice stealing algorithm
|
||||
absl::c_stable_sort(voices, voiceOrdering);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue