mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
Amend c6a49fdd50 drop automation actions
This fixes a crash when showing the same Pianoroll again, since actions a already present, a NULL reference was pushed to session_sensitive_actions. Closing a session then crashed accessing a NULL Action.
This commit is contained in:
parent
6a4d865452
commit
664a2b4a8e
1 changed files with 4 additions and 0 deletions
|
|
@ -288,6 +288,7 @@ EditingContext::~EditingContext()
|
||||||
ActionManager::drop_action_group (channel_actions);
|
ActionManager::drop_action_group (channel_actions);
|
||||||
ActionManager::drop_action_group (velocity_actions);
|
ActionManager::drop_action_group (velocity_actions);
|
||||||
ActionManager::drop_action_group (zoom_actions);
|
ActionManager::drop_action_group (zoom_actions);
|
||||||
|
ActionManager::drop_action_group (_automation_actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -2596,6 +2597,7 @@ RefPtr<Action>
|
||||||
EditingContext::reg_sens (RefPtr<ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot)
|
EditingContext::reg_sens (RefPtr<ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot)
|
||||||
{
|
{
|
||||||
RefPtr<Action> act = ActionManager::register_action (group, name, label, slot);
|
RefPtr<Action> act = ActionManager::register_action (group, name, label, slot);
|
||||||
|
assert(act);
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
return act;
|
return act;
|
||||||
}
|
}
|
||||||
|
|
@ -2604,6 +2606,7 @@ Glib::RefPtr<ToggleAction>
|
||||||
EditingContext::toggle_reg_sens (RefPtr<ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot)
|
EditingContext::toggle_reg_sens (RefPtr<ActionGroup> group, char const * name, char const * label, sigc::slot<void> slot)
|
||||||
{
|
{
|
||||||
RefPtr<ToggleAction> act = ActionManager::register_toggle_action (group, name, label, slot);
|
RefPtr<ToggleAction> act = ActionManager::register_toggle_action (group, name, label, slot);
|
||||||
|
assert(act);
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
return act;
|
return act;
|
||||||
}
|
}
|
||||||
|
|
@ -2612,6 +2615,7 @@ Glib::RefPtr<Gtk::RadioAction>
|
||||||
EditingContext::radio_reg_sens (RefPtr<ActionGroup> action_group, RadioAction::Group& radio_group, char const * name, char const * label, sigc::slot<void> slot)
|
EditingContext::radio_reg_sens (RefPtr<ActionGroup> action_group, RadioAction::Group& radio_group, char const * name, char const * label, sigc::slot<void> slot)
|
||||||
{
|
{
|
||||||
RefPtr<RadioAction> act = ActionManager::register_radio_action (action_group, radio_group, name, label, slot);
|
RefPtr<RadioAction> act = ActionManager::register_radio_action (action_group, radio_group, name, label, slot);
|
||||||
|
assert(act);
|
||||||
ActionManager::session_sensitive_actions.push_back (act);
|
ActionManager::session_sensitive_actions.push_back (act);
|
||||||
return act;
|
return act;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue