mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 17:46:34 +01:00
Fix crash when deleting Plugin after MIDI binding #8756
BindingProxy owns a PopUp prompter with 30 sec self-destruct timeout. However ~BindingProxy explicitly destroys the PopUp. Later the timeout can lead to a double-free. This fixes a crash when deleting a plugin within 30 sec after using MIDI learn.
This commit is contained in:
parent
da8e4da34f
commit
8ad1405cf5
1 changed files with 5 additions and 0 deletions
|
|
@ -45,6 +45,9 @@ PopUp::PopUp (Gtk::WindowPosition pos, unsigned int showfor_msecs, bool doh)
|
||||||
|
|
||||||
PopUp::~PopUp ()
|
PopUp::~PopUp ()
|
||||||
{
|
{
|
||||||
|
if (popdown_time != 0 && timeout != -1) {
|
||||||
|
g_source_remove (timeout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -76,6 +79,7 @@ PopUp::remove ()
|
||||||
|
|
||||||
if (popdown_time != 0 && timeout != -1) {
|
if (popdown_time != 0 && timeout != -1) {
|
||||||
g_source_remove (timeout);
|
g_source_remove (timeout);
|
||||||
|
timeout = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (delete_on_hide) {
|
if (delete_on_hide) {
|
||||||
|
|
@ -137,6 +141,7 @@ PopUp::on_delete_event (GdkEventAny* /*ev*/)
|
||||||
|
|
||||||
if (popdown_time != 0 && timeout != -1) {
|
if (popdown_time != 0 && timeout != -1) {
|
||||||
g_source_remove (timeout);
|
g_source_remove (timeout);
|
||||||
|
timeout = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (delete_on_hide) {
|
if (delete_on_hide) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue