Do not dereference null pointer

Part of #12226
This commit is contained in:
Enrico Forestieri 2021-04-07 00:15:12 +02:00
parent 98fa63dcb4
commit 8ec32dc3f9

View File

@ -534,7 +534,7 @@ void TocWidget::filterContents()
int size = indices.size();
for (int i = 0; i < size; i++) {
QModelIndex index = indices[i];
bool matches =
bool matches = filter_ &&
index.data().toString().contains(
filter_->text(), Qt::CaseInsensitive);
TocItem const & item =