diff --git a/gtk2_ardour/floating_text_entry.cc b/gtk2_ardour/floating_text_entry.cc index 29be2ef774..da8b734539 100644 --- a/gtk2_ardour/floating_text_entry.cc +++ b/gtk2_ardour/floating_text_entry.cc @@ -31,6 +31,7 @@ FloatingTextEntry::FloatingTextEntry (Gtk::Window* parent, const std::string& in : Gtk::Window (Gtk::WINDOW_POPUP) , entry_changed (false) , by_popup_menu (false) + , _delete_queued (false) { //set_name (X_("FloatingTextEntry")); set_position (Gtk::WIN_POS_MOUSE); @@ -184,8 +185,13 @@ FloatingTextEntry::on_hide () void FloatingTextEntry::idle_delete_self () { + if (_delete_queued) { + PBD::stacktrace (std::cerr, 20); + return; + } for (std::list::iterator i = _connections.begin(); i != _connections.end(); ++i) { i->disconnect (); } + _delete_queued = true; delete_when_idle (this); } diff --git a/gtk2_ardour/floating_text_entry.h b/gtk2_ardour/floating_text_entry.h index d70185a8a6..695606abe6 100644 --- a/gtk2_ardour/floating_text_entry.h +++ b/gtk2_ardour/floating_text_entry.h @@ -52,6 +52,7 @@ private: void idle_delete_self (); std::list _connections; + bool _delete_queued; /* handlers for window events */