[LyX/master] Fix crash after 24926b2e239.
Richard Kimberly Heck
rikiheck at lyx.org
Sat Mar 28 19:05:04 UTC 2020
commit 104fdcc9be40df19d50cddad7f8ae9ab63bbf5f7
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Sat Mar 28 15:23:13 2020 -0400
Fix crash after 24926b2e239.
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.
---
src/frontends/qt/GuiPrefs.cpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index d716d85..98aa0c1 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -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);
}
}
More information about the lyx-cvs
mailing list