Fix crash at session close - fix use-after-free

Pianoroll::maybe_update() was able to use _session
after session was already unset.
This commit is contained in:
Robin Gareus
2025-08-17 06:34:31 +02:00
parent a91aa6ee9d
commit 6672db9794
2 changed files with 8 additions and 0 deletions

View File

@@ -1865,6 +1865,13 @@ Pianoroll::set_session (ARDOUR::Session* s)
}
}
void
Pianoroll::session_going_away ()
{
CueEditor::session_going_away ();
_update_connection.disconnect ();
}
void
Pianoroll::map_transport_state ()
{

View File

@@ -148,6 +148,7 @@ class Pianoroll : public CueEditor
bool key_release_handler (ArdourCanvas::Item*, GdkEvent*, ItemType);
void escape ();
void session_going_away ();
private:
ArdourCanvas::Ruler* bbt_ruler;