mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Fix crash at start when rulers-follow-grid is enabled
When creating the editor, default modes are set, this toggles mouse-modes, in `Editor::mouse_mode_chosen` which in turn calls EditingContext::grid_type_chosen. With rulers-follow-grid enabled this can call `Editor::toggle_ruler_visibility`. Since `_session` is NULL during editor's c-tor this caused a crash in `Editor::store_ruler_visibility`.
This commit is contained in:
parent
391fe97693
commit
4b1d2b7ac8
2 changed files with 6 additions and 1 deletions
|
|
@ -660,7 +660,10 @@ Editor::Editor ()
|
|||
|
||||
setup_toolbar ();
|
||||
|
||||
set_action_defaults ();
|
||||
{
|
||||
PBD::Unwinder<bool> uw (no_ruler_shown_update, true);
|
||||
set_action_defaults ();
|
||||
}
|
||||
|
||||
ARDOUR_UI::instance()->ActionsReady.connect_same_thread (*this, std::bind (&Editor::initialize_ruler_actions, this));
|
||||
|
||||
|
|
|
|||
|
|
@ -777,6 +777,8 @@ Editor::toggle_ruler_visibility ()
|
|||
return;
|
||||
}
|
||||
|
||||
assert (_session);
|
||||
|
||||
update_ruler_visibility ();
|
||||
store_ruler_visibility ();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue