13
0

triggerbox: don't fail/crash/assert if set_from_path() is called on an illegal slot

This commit is contained in:
Paul Davis 2021-10-11 17:56:56 -06:00
parent 43993da7b4
commit 24a09e381a

View File

@ -1032,7 +1032,9 @@ TriggerBox::get_next_trigger ()
int
TriggerBox::set_from_path (uint64_t slot, std::string const & path)
{
assert (slot < all_triggers.size());
if (slot >= all_triggers.size()) {
return 0;
}
try {
SoundFileInfo info;