]> git.lyx.org Git - features.git/commitdiff
Additional check for empty word to avoid potential crash if no WordLangTuple is assig...
authorStephan Witt <switt@lyx.org>
Wed, 16 Nov 2022 06:34:27 +0000 (07:34 +0100)
committerStephan Witt <switt@lyx.org>
Fri, 25 Nov 2022 08:07:40 +0000 (09:07 +0100)
src/frontends/qt/Menus.cpp

index 679efe461ced015ea4b3fdbf2702b3f65078b6f5..f4a2358f3cf79f286bfce00bde57de191a16e7ee 100644 (file)
@@ -881,6 +881,8 @@ void MenuDefinition::expandSpellingSuggestions(BufferView const * bv)
                }
                break;
        case SpellChecker::WORD_OK: {
+                       if (wl.word().empty())
+                               break;
                        LYXERR(Debug::GUI, "Valid Word.");
                        docstring const arg = wl.word() + " " + from_ascii(wl.lang()->lang());
                        add(MenuItem(MenuItem::Command, qt_("Remove from personal dictionary|r"),