]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt/Menus.cpp
Additional check for empty word to avoid potential crash if no WordLangTuple is assig...
[features.git] / 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"),