diff --git a/gtk2_ardour/route_comment_editor.cc b/gtk2_ardour/route_comment_editor.cc index ffc24beb93..5fc6236bf4 100644 --- a/gtk2_ardour/route_comment_editor.cc +++ b/gtk2_ardour/route_comment_editor.cc @@ -23,7 +23,6 @@ #include "ardour/session_configuration.h" #include "gtkmm2ext/utils.h" -#include "gtkmm2ext/doi.h" #include "gui_thread.h" #include "option_editor.h" @@ -58,7 +57,7 @@ RouteCommentEditor::RouteCommentEditor (std::shared_ptr r) _route = r; _route->set_comment_editor (this); _route->comment_changed.connect (_connections, invalidator (*this), std::bind (&RouteCommentEditor::comment_changed, this), gui_context ()); - _route->DropReferences.connect (_connections, invalidator (*this), std::bind (&delete_when_idle, this), gui_context ()); + _route->DropReferences.connect (_connections, invalidator (*this), [this] { delete this; }, gui_context ()); Gtkmm2ext::container_clear (_vbox, false); _vbox.pack_start (_comment_area);