]> git.lyx.org Git - lyx.git/blobdiff - src/LyX.cpp
InsetHyperlink.cpp: fix a bug I introduced in r26218
[lyx.git] / src / LyX.cpp
index 7a012e7eeb6949272f0fe98acf3c09a71c3885d1..1c0609331c64129eab055dcbae0e82807f8cc628 100644 (file)
@@ -233,19 +233,19 @@ Messages & LyX::messages(string const & language)
 
 void setRcGuiLanguage()
 {
-       LASSERT(singleton_, "");
+       LASSERT(singleton_, /**/);
        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!");
+       Messages::init();
        singleton_->pimpl_->messages_["GUI"] = Messages();
 }