diff options
author | bsalomon <bsalomon@google.com> | 2015-12-04 07:27:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-04 07:27:36 -0800 |
commit | ea75053c964799b44543279a1323edc0aa706a0c (patch) | |
tree | c93941398f77b8283a453c5cb344788f46e65438 | |
parent | 97ff7f56620a50e83e433b158a86ff082935ed47 (diff) |
Speculative fix for win8 bot crash in ~GrAutoLocaleSetter
Review URL: https://codereview.chromium.org/1493913008
-rw-r--r-- | src/gpu/GrAutoLocaleSetter.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gpu/GrAutoLocaleSetter.h b/src/gpu/GrAutoLocaleSetter.h index bcb23cfb29..51164e9813 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) { |