mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
Messages::init(); needs Package. this fixes a crash on windows which presents parsing of the argument
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38139 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b391929ece
commit
97a5c0882d
@ -295,7 +295,6 @@ int LyX::exec(int & argc, char * argv[])
|
||||
} catch (ExceptionMessage const & message) {
|
||||
LYXERR(Debug::LOCALE, message.title_ + ", " + message.details_);
|
||||
}
|
||||
// FIXME: This breaks out of source build under Windows.
|
||||
locale_init();
|
||||
|
||||
// Here we need to parse the command line. At least
|
||||
|
@ -65,6 +65,12 @@ void init_package(string const & command_line_arg0,
|
||||
}
|
||||
|
||||
|
||||
bool packageInitialized()
|
||||
{
|
||||
return initialised_;
|
||||
}
|
||||
|
||||
|
||||
Package const & package()
|
||||
{
|
||||
LASSERT(initialised_, /**/);
|
||||
|
@ -52,6 +52,8 @@ void init_package(std::string const & command_line_arg0,
|
||||
std::string const & command_line_user_support_dir,
|
||||
exe_build_dir_to_top_build_dir);
|
||||
|
||||
bool packageInitialized();
|
||||
|
||||
/** Accessor to the global data.
|
||||
* Asserts that init_package() has been called first.
|
||||
*/
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
#include "support/lstrings.h"
|
||||
#include "support/Messages.h"
|
||||
#include "support/Package.h"
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
# include <locale.h>
|
||||
@ -37,7 +38,9 @@ void locale_init()
|
||||
setlocale(LC_MESSAGES, "");
|
||||
# endif
|
||||
setlocale(LC_CTYPE, "");
|
||||
Messages::init();
|
||||
if (support::packageInitialized()) {
|
||||
Messages::init();
|
||||
}
|
||||
#endif
|
||||
setlocale(LC_NUMERIC, "C");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user