mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-02 03:47:42 +01:00
avoid crash during shutdown, caused by accessing a null session during pointer leave event handling
This commit is contained in:
parent
8b1b1e2362
commit
e1f0a6b731
1 changed files with 3 additions and 1 deletions
|
|
@ -4029,8 +4029,10 @@ Editor::_get_preferred_edit_position (EditIgnoreOption ignore, bool from_context
|
|||
if (_dragging_playhead) {
|
||||
/* NOTE: since the user is dragging with the mouse, this operation will implicitly be Snapped */
|
||||
where = timepos_t (_playhead_cursor->current_sample());
|
||||
} else {
|
||||
} else if (_session) {
|
||||
where = timepos_t (_session->audible_sample());
|
||||
} else {
|
||||
where = timepos_t (0);
|
||||
}
|
||||
DEBUG_TRACE (DEBUG::CutNPaste, string_compose ("GPEP: use playhead @ %1\n", where));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue