Fix crash after 24926b2e23.

The matched element may not have a parent. I guess the old version of
setExpanded too care of that. Now we have to do so.
This commit is contained in:
Richard Kimberly Heck 2020-03-28 15:23:13 -04:00
parent c5c1683024
commit 104fdcc9be

View File

@ -3266,7 +3266,8 @@ void PrefShortcuts::on_searchLE_textEdited()
for (int i = 0; i < matched.size(); ++i)
if (!isAlwaysHidden(*matched[i])) {
matched[i]->setHidden(false);
matched[i]->parent()->setExpanded(true);
if (matched[i]->parent())
matched[i]->parent()->setExpanded(true);
}
}