mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
SearchToolBar: Guard against running search callback after toolbar was deleted
This commit is contained in:
parent
418333d453
commit
1387baade0
@ -113,7 +113,11 @@ void SearchToolBar::caseSensitivityChanged()
|
||||
|
||||
void SearchToolBar::searchText(const QString &text)
|
||||
{
|
||||
m_view->findText(text, m_findFlags, [this](bool found) {
|
||||
QPointer<SearchToolBar> guard = this;
|
||||
m_view->findText(text, m_findFlags, [=](bool found) {
|
||||
if (!guard) {
|
||||
return;
|
||||
}
|
||||
if (ui->lineEdit->text().isEmpty())
|
||||
found = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user