Skip to content

Commit

Permalink
fix: don't crash when closing a tab via the cross icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed May 14, 2024
1 parent 2a15d0f commit e805e7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/src/main-window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<QTabBar*>()->setTabButton(index, QTabBar::RightSide, closeTab);

if (!background) {
Expand Down

0 comments on commit e805e7c

Please # to comment.