Skip to content

Commit

Permalink
Add check for out-of-range reference index
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiegle committed Feb 8, 2024
1 parent 8923654 commit a600563
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/UI/NeuropixInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,8 @@ void NeuropixInterface::loadParameters(XmlElement* xml)
settings.lfpGainIndex = probe->settings.lfpGainIndex;
settings.apGainIndex = probe->settings.apGainIndex;
settings.referenceIndex = probe->settings.referenceIndex;
if (settings.referenceIndex >= referenceComboBox->getNumItems())
settings.referenceIndex = 0;
settings.availableApGains = probe->settings.availableApGains;
settings.availableLfpGains = probe->settings.availableLfpGains;
settings.availableBanks = probe->settings.availableBanks;
Expand Down

0 comments on commit a600563

Please sign in to comment.