13
0

Fix heap-use-after-free when toggling manual pin-control

When toggling "Manual Config", Route::customize_plugin_insert()
or Route::reset_plugin_insert() emits processors_changed.

This destroyed the widget from which the change was initiated,
in ppw.clear(), leading to a use-after-free in
ArdourButton::on_button_release_event(_GdkEventButton*) ../libs/widgets/ardour_button.cc:995

The PluginPinDialog does not need to refill the widget list
when manual config is toggled, only the PluginPinWidget itself
needs to updated.
This commit is contained in:
Robin Gareus 2023-06-22 04:50:43 +02:00
parent 6261bb3a40
commit 71a83ed199
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -2147,8 +2147,11 @@ PluginPinDialog::map_height (Gtk::Allocation&)
}
void
PluginPinDialog::route_processors_changed (ARDOUR::RouteProcessorChange)
PluginPinDialog::route_processors_changed (ARDOUR::RouteProcessorChange c)
{
if (c.type == RouteProcessorChange::CustomPinChange) {
return;
}
ppw.clear ();
_height_mapped = false;
scroller->remove ();