Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-05-01 21:11:07 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-05-01 21:11:07 +0400
commitfd6ab0564d487a057a44131c4464708efff8511f (patch)
treec4989aa2ace573567c1198b4c99f902989ad3d92 /intern/locale
parente5344adda3c49e737da1411988f6d72bd7446f05 (diff)
This should at least prevent crash in [#35172]...
Diffstat (limited to 'intern/locale')
-rw-r--r--intern/locale/boost_locale_wrapper.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp
index 81c348e52f1..bc902ac661e 100644
--- a/intern/locale/boost_locale_wrapper.cpp
+++ b/intern/locale/boost_locale_wrapper.cpp
@@ -76,20 +76,23 @@ 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). */
+ /* 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();
+ 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
+
}
- if (LOCALE_INFO.variant() != "") {
- locale_str += "@" + LOCALE_INFO.variant();
+ catch(std::exception const &e) {
+ std::cout << "bl_locale_set(" << locale << "): " << e.what() << " \n";
}
}