Avoid crashes on torrent search

qbittorrent closes itself without any error message when a search tab
should be notified of a status change: fixed bad pointer variable catch
in lambda code.
This commit is contained in:
paolo-sz 2019-03-04 21:16:05 +01:00
parent c109b7a57a
commit 22835c0350

View File

@ -337,7 +337,7 @@ void SearchWidget::on_searchButton_clicked()
m_ui->tabWidget->setCurrentWidget(newTab);
connect(newTab, &SearchJobWidget::resultsCountUpdated, this, &SearchWidget::resultsCountUpdated);
connect(newTab, &SearchJobWidget::statusChanged, this, [this, &newTab]() { tabStatusChanged(newTab); });
connect(newTab, &SearchJobWidget::statusChanged, this, [this, newTab]() { tabStatusChanged(newTab); });
m_ui->searchButton->setText(tr("Stop"));
m_activeSearchTab = newTab;