triggerbox: don't fail/crash/assert if set_from_path() is called on an illegal slot
This commit is contained in:
parent
43993da7b4
commit
24a09e381a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user