From 10c46e5db800a9c4934acc0cc89261f7fcdf0b3c Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Mon, 14 Jul 2008 10:14:59 +0000 Subject: [PATCH] Fix potential crash. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25604 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyX.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/LyX.cpp b/src/LyX.cpp index 4038eae82d..7a012e7eeb 100644 --- a/src/LyX.cpp +++ b/src/LyX.cpp @@ -237,6 +237,9 @@ void setRcGuiLanguage() if (lyxrc.gui_language == "auto") return; Language const * language = languages.getLanguage(lyxrc.gui_language); + if (!language) + // Not possible at this point. + return; LYXERR(Debug::LOCALE, "Setting LANGUAGE to " << language->code()); if (!setEnv("LANGUAGE", language->code())) LYXERR(Debug::LOCALE, "\t... failed!");