From e805e7c1a11c905b614e4a6b41c106d2a9c8616b Mon Sep 17 00:00:00 2001 From: Bionus Date: Tue, 14 May 2024 19:05:28 +0200 Subject: [PATCH] fix: don't crash when closing a tab via the cross icon --- src/gui/src/main-window.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/src/main-window.cpp b/src/gui/src/main-window.cpp index 7033c0217..24a58316c 100644 --- a/src/gui/src/main-window.cpp +++ b/src/gui/src/main-window.cpp @@ -544,7 +544,7 @@ void MainWindow::addSearchTab(SearchTab *w, bool background, bool save, SearchTa auto *closeTab = new QPushButton(QIcon(":/images/close.png"), "", this); closeTab->setFlat(true); closeTab->resize(QSize(8, 8)); - connect(closeTab, &QPushButton::clicked, w, &SearchTab::deleteLater); + connect(closeTab, &QPushButton::clicked, w, &SearchTab::close); ui->tabWidget->findChild()->setTabButton(index, QTabBar::RightSide, closeTab); if (!background) {