]> git.lyx.org Git - features.git/commitdiff
r25604: better fix.
authorAbdelrazak Younes <younes@lyx.org>
Mon, 14 Jul 2008 11:49:08 +0000 (11:49 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 14 Jul 2008 11:49:08 +0000 (11:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25610 a592a061-630c-0410-9148-cb99ea01b6c8

src/LyX.cpp

index c491857bea0e6c4a78fb7f498bb3726664fc6f31..35ccf17923c97ff33f77d9334aea2165fd44ef0a 100644 (file)
@@ -237,12 +237,11 @@ 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!");
+       if (language) {
+               LYXERR(Debug::LOCALE, "Setting LANGUAGE to " << language->code());
+               if (!setEnv("LANGUAGE", language->code()))
+                       LYXERR(Debug::LOCALE, "\t... failed!");
+       }
        LYXERR(Debug::LOCALE, "Setting LC_ALL to en_US");
        if (!setEnv("LC_ALL", "en_US"))
                LYXERR(Debug::LOCALE, "\t... failed!");