just delete RouteCommentEditor directly, not via an idle callback

Using an idle callback delays desctruction for too long, and the dangling reference
to a stripable causes havoc
This commit is contained in:
Paul Davis 2026-01-19 22:00:04 -07:00
parent 3f17381d49
commit 236a9bf73b

View file

@ -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<Route> 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<RouteCommentEditor>, this), gui_context ());
_route->DropReferences.connect (_connections, invalidator (*this), [this] { delete this; }, gui_context ());
Gtkmm2ext::container_clear (_vbox, false);
_vbox.pack_start (_comment_area);