diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-04-02 15:48:56 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-04-02 15:48:56 +0000 |
commit | ad36fe5c19880a1cc03e24acf561e038fbbb6824 (patch) | |
tree | 4a715cfce58ef109a80b1c36cbb1bde31ec46b74 /libcxx/src | |
parent | 39e9506a1e4419085ca3a71bd07d247c8b63f8c0 (diff) | |
download | bcm5719-llvm-ad36fe5c19880a1cc03e24acf561e038fbbb6824.tar.gz bcm5719-llvm-ad36fe5c19880a1cc03e24acf561e038fbbb6824.zip |
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077132.html
llvm-svn: 178545
Diffstat (limited to 'libcxx/src')
-rw-r--r-- | libcxx/src/support/win32/locale_win32.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/src/support/win32/locale_win32.cpp b/libcxx/src/support/win32/locale_win32.cpp index 02b5874e294..e8c630c1faf 100644 --- a/libcxx/src/support/win32/locale_win32.cpp +++ b/libcxx/src/support/win32/locale_win32.cpp @@ -20,6 +20,8 @@ locale_t newlocale( int mask, const char * locale, locale_t /*base*/ ) locale_t uselocale( locale_t newloc ) { locale_t old_locale = _get_current_locale(); + if ( newloc == NULL ) + return old_locale; // uselocale sets the thread's locale by definition, so unconditionally use thread-local locale _configthreadlocale( _ENABLE_PER_THREAD_LOCALE ); // uselocale sets all categories |