Skip to content

Commit 84de117

Browse files
committed
Do not update electrodes in spikesorter when last one is removed
1 parent 57242f2 commit 84de117

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Source/Processors/SpikeSorter/SpikeSorter.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,11 @@ bool SpikeSorter::removeElectrode(int index)
523523
void SpikeSorter::setElectrodeName(int index, String newName)
524524
{
525525
mut.enter();
526-
if ((electrodes.size() > 0) && (index > 0))
527-
electrodes[index-1]->name = newName;
528-
updateSinks(electrodes[index-1]->electrodeID, newName);
526+
if ((electrodes.size() > 0) && (index > 0))
527+
{
528+
electrodes[index - 1]->name = newName;
529+
updateSinks(electrodes[index - 1]->electrodeID, newName);
530+
}
529531
mut.exit();
530532
}
531533

0 commit comments

Comments
 (0)