mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
Fix #7015, Crash while aborting Region trim using Esc key
There were two issues: The first is that TrimDrag::aborted was calling TrimDrag::finished with a null GdkEvent which caused a segfault when dereferencing. So avoid that by passing in a dummy event as we are just going to undo the operation in the next step anyway so it shouldn't matter if it is valid(AFAICT). The other is that TrimDrag:aborted was calling Editor::undo() which was in turn calling TrimDrag::aborted leading to infinite recursion and stack overflow. Calling Session::undo() directly seems to avoid that issue. This fix feels like a bit of a hack...but it seems to work and is better than a crash.
This commit is contained in:
parent
f91e591f40
commit
fc0114a7e2
1 changed files with 3 additions and 2 deletions
|
|
@ -3087,10 +3087,11 @@ TrimDrag::aborted (bool movement_occurred)
|
|||
behind which may be slightly odd from the user's point of view.
|
||||
*/
|
||||
|
||||
finished (0, true);
|
||||
GdkEvent ev;
|
||||
finished (&ev, true);
|
||||
|
||||
if (movement_occurred) {
|
||||
_editor->undo ();
|
||||
_editor->session()->undo (1);
|
||||
}
|
||||
|
||||
for (list<DraggingView>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue