Index: src/gpu/GrAutoLocaleSetter.h |
diff --git a/src/gpu/GrAutoLocaleSetter.h b/src/gpu/GrAutoLocaleSetter.h |
index bcb23cfb29fd8345cdd8d8239f5d467de437b437..51164e9813a056016a4a71a26855cc315a4ad6e4 100644 |
--- a/src/gpu/GrAutoLocaleSetter.h |
+++ b/src/gpu/GrAutoLocaleSetter.h |
@@ -42,7 +42,9 @@ public: |
~GrAutoLocaleSetter () { |
#if defined(SK_BUILD_FOR_WIN) |
- setlocale(LC_ALL, fOldLocale); |
+ if (fOldLocale) { |
+ setlocale(LC_ALL, fOldLocale); |
+ } |
_configthreadlocale(fOldPerThreadLocale); |
#elif !defined(SK_BUILD_FOR_ANDROID) && !defined(__UCLIBC__) |
if (fLocale) { |