This should at least prevent crash in [#35172]...

This commit is contained in:
Bastien Montagne 2013-05-01 17:11:07 +00:00
parent e5344adda3
commit fd6ab0564d

@ -76,10 +76,6 @@ void bl_locale_set(const char *locale)
#endif
}
// Note: boost always uses "C" LC_NUMERIC by default!
}
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)
@ -91,6 +87,13 @@ void bl_locale_set(const char *locale)
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";
}
}
const char *bl_locale_get(void)