Skip to content
Snippets Groups Projects
Commit 28f590aa authored by Aaron Cuevas Lopez's avatar Aaron Cuevas Lopez
Browse files

Prevent crash in channel mapper when loading a config file with more channels that available

parent c4db3564
Branches
Tags
No related merge requests found
......@@ -1026,6 +1026,9 @@ String ChannelMappingEditor::loadPrbFile(File filename)
std::cout << "We found this many: " << map->size() << std::endl;
if (map->size() > previousChannelCount)
createElectrodeButtons(map->size(), false);
for (int i = 0; i < map->size(); i++)
{
int ch = map->getUnchecked(i);
......@@ -1046,6 +1049,7 @@ String ChannelMappingEditor::loadPrbFile(File filename)
getProcessor()->setParameter(1, rf);
getProcessor()->setParameter(3, en ? 1 : 0);
}
checkUnusedChannels();
var refChans = json[Identifier("refs")];
var channels = refChans[Identifier("channels")];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment