forked from bartvdbraak/blender
This should at least prevent crash in [#35172]...
This commit is contained in:
parent
e5344adda3
commit
fd6ab0564d
@ -76,21 +76,24 @@ void bl_locale_set(const char *locale)
|
||||
#endif
|
||||
}
|
||||
// Note: boost always uses "C" LC_NUMERIC by default!
|
||||
|
||||
/* Generate the locale string (useful to know which locale we are actually using in case of "default" one). */
|
||||
#define LOCALE_INFO std::use_facet<boost::locale::info>(_locale)
|
||||
|
||||
locale_str = LOCALE_INFO.language();
|
||||
if (LOCALE_INFO.country() != "") {
|
||||
locale_str += "_" + LOCALE_INFO.country();
|
||||
}
|
||||
if (LOCALE_INFO.variant() != "") {
|
||||
locale_str += "@" + LOCALE_INFO.variant();
|
||||
}
|
||||
|
||||
#undef LOCALE_INFO
|
||||
|
||||
}
|
||||
catch(std::exception const &e) {
|
||||
std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n";
|
||||
}
|
||||
|
||||
/* Generate the locale string (useful to know which locale we are actually using in case of "default" one). */
|
||||
#define LOCALE_INFO std::use_facet<boost::locale::info>(_locale)
|
||||
|
||||
locale_str = LOCALE_INFO.language();
|
||||
if (LOCALE_INFO.country() != "") {
|
||||
locale_str += "_" + LOCALE_INFO.country();
|
||||
}
|
||||
if (LOCALE_INFO.variant() != "") {
|
||||
locale_str += "@" + LOCALE_INFO.variant();
|
||||
}
|
||||
}
|
||||
|
||||
const char *bl_locale_get(void)
|
||||
|
Loading…
Reference in New Issue
Block a user