13
0

Fix assert() when aborting automation line drag

This commit is contained in:
Robin Gareus 2024-08-19 22:15:58 +02:00
parent fb1ca67e39
commit 8e063110db
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -1843,8 +1843,12 @@ Editor::button_release_handler (ArdourCanvas::Item* item, GdkEvent* event, ItemT
switch (item_type) {
case RegionItem:
{
/* since we have FreehandLineDrag we can only get here after a drag, when no movement has happend */
assert (were_dragging);
/* since we have FreehandLineDrag we can only get here after a drag, when no movement has happend.
* Except when a drag was aborted by pressing Esc.
*/
if (!were_dragging) {
return true;
}
AudioRegionView* arv = dynamic_cast<AudioRegionView*> (clicked_regionview);
AutomationRegionView* atv = dynamic_cast<AutomationRegionView*> (clicked_regionview);