AutomationLine: make sure control points aren't empty

- Otherwise this trigger a C++ assert when built with it
- More reference https://github.com/flathub/org.ardour.Ardour/issues/34
This commit is contained in:
Hubert Figuière 2022-05-28 22:42:39 -04:00
parent c82745301c
commit 9e754959f6
1 changed files with 1 additions and 1 deletions

View File

@ -1035,7 +1035,7 @@ AutomationLine::reset_callback (const Evoral::ControlList& events)
delete cp;
}
if (!terminal_points_can_slide) {
if (!terminal_points_can_slide && !control_points.empty()) {
control_points.back()->set_can_slide(false);
}