Skip to content

Commit e72d57f

Browse files
authored
Merge pull request #273 from tne-lab/lfpviewer-no-chan-fix
Fix crash when clicking on LFP viewer canvas with no channels
2 parents 6465f04 + 6b3c496 commit e72d57f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Source/Plugins/LfpDisplayNode/LfpDisplayCanvas.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,6 +3033,11 @@ bool LfpDisplay::getSingleChannelState()
30333033

30343034
void LfpDisplay::mouseDown(const MouseEvent& event)
30353035
{
3036+
if (drawableChannels.isEmpty())
3037+
{
3038+
return;
3039+
}
3040+
30363041
//int y = event.getMouseDownY(); //relative to each channel pos
30373042
MouseEvent canvasevent = event.getEventRelativeTo(viewport);
30383043
int y = canvasevent.getMouseDownY() + viewport->getViewPositionY(); // need to account for scrolling

0 commit comments

Comments
 (0)