Merge pull request #1162 from ispyisail/fix/terminal-strip-dock-use-after-free

Fix a crash when closing a project after its terminal strip window is gone
This commit is contained in:
ispyisail
2026-09-30 11:33:15 +13:00
committed by GitHub
@@ -62,7 +62,9 @@ void TerminalStripTreeDockWidget::setProject(QETProject *project)
}
m_project = project;
if (m_project) {
m_project_destroy_connection = connect(m_project, &QObject::destroyed, [this](){
//`this` as context: this dock can be deleted before the project
//(with the editor window that owns it), and the connection must go with it
m_project_destroy_connection = connect(m_project, &QObject::destroyed, this, [this](){
this->m_current_strip.clear();
this->reload();
});