aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 3aa50c9d4d..bcb23cfb29 100644
--- a/src/gpu/GrAutoLocaleSetter.h
+++ b/src/gpu/GrAutoLocaleSetter.h
@@ -22,7 +22,7 @@
* Helper class for ensuring that we don't use the wrong locale when building shaders. Android
* doesn't support locale in the NDK, so this is a no-op there.
*/
-class GrAutoLocaleSetter {
+class GrAutoLocaleSetter : public SkNoncopyable {
public:
GrAutoLocaleSetter (const char* name) {
#if defined(SK_BUILD_FOR_WIN)
@@ -32,6 +32,8 @@ public:
fLocale = newlocale(LC_ALL, name, 0);
if (fLocale) {
fOldLocale = uselocale(fLocale);
+ } else {
+ fOldLocale = static_cast<locale_t>(0);
}
#else
(void) name; // suppress unused param warning.