aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-12-04 07:27:36 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-04 07:27:36 -0800
commitea75053c964799b44543279a1323edc0aa706a0c (patch)
treec93941398f77b8283a453c5cb344788f46e65438
parent97ff7f56620a50e83e433b158a86ff082935ed47 (diff)
Speculative fix for win8 bot crash in ~GrAutoLocaleSetter
-rw-r--r--src/gpu/GrAutoLocaleSetter.h4
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) {