From 640918d0b1a9a0411fd3898fc7cd07e8c080c4f0 Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Wed, 16 Nov 2022 07:34:27 +0100 Subject: [PATCH] Additional check for empty word to avoid potential crash if no WordLangTuple is assigned by spell check --- src/frontends/qt/Menus.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp index 679efe461c..f4a2358f3c 100644 --- a/src/frontends/qt/Menus.cpp +++ b/src/frontends/qt/Menus.cpp @@ -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"), -- 2.39.5