]> git.lyx.org Git - features.git/commitdiff
Fix crash at startup for tex2ylx and lyxclient
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 31 May 2013 09:57:50 +0000 (11:57 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 31 May 2013 09:59:52 +0000 (11:59 +0200)
This is done by handling explicitly a dummy Message object, where no parsing of mo file is attempted. This avoids in turn that the lyxerr object is used during initialization of a global dummy Message object.

src/support/Messages.cpp
src/support/Messages.h

index ca41d6a13dbcacd5046c80227044fc0a6614fac9..4eeea5f6897e8c11882b0cda7db9222567cfbd1d 100644 (file)
@@ -140,7 +140,6 @@ namespace lyx {
 std::string Messages::gui_lang_;
 
 
-// This version use the traditional gettext.
 Messages::Messages(string const & l)
        : lang_(l)
 {
index a6e937256d1ab6ff913ecca1e01fc7211bc5be97..dd24e1c5fccc29b8fba98c90d9f43d9bc26ead6f 100644 (file)
@@ -21,9 +21,10 @@ namespace lyx {
 ///
 class Messages {
 public:
+       /// dummy instantiation: no translation is done
+       Messages() {}
        /// messages in the language \p l.
-       /// If \p l is empty, the language will be defined by the environment.
-       Messages(std::string const & l = std::string());
+       Messages(std::string const & l);
        ///
        docstring const get(std::string const & msg) const;
        /// What is the language associated with this translation?