From 00387b2a38a1d5a3917eef0f30fac63814b8ac2b Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 31 May 2013 11:57:50 +0200 Subject: [PATCH] Fix crash at startup for tex2ylx and lyxclient 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 | 1 - src/support/Messages.h | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/support/Messages.cpp b/src/support/Messages.cpp index ca41d6a13d..4eeea5f689 100644 --- a/src/support/Messages.cpp +++ b/src/support/Messages.cpp @@ -140,7 +140,6 @@ namespace lyx { std::string Messages::gui_lang_; -// This version use the traditional gettext. Messages::Messages(string const & l) : lang_(l) { diff --git a/src/support/Messages.h b/src/support/Messages.h index a6e937256d..dd24e1c5fc 100644 --- a/src/support/Messages.h +++ b/src/support/Messages.h @@ -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? -- 2.39.2