Skip to content

Commit aed19b9

Browse files
ethanbbaacuevas
authored andcommitted
Fix crash when clicking on canvas with no channels
1 parent 6475576 commit aed19b9

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)