We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b4359b commit 944daa7Copy full SHA for 944daa7
Release/src/utilities/asyncrt_utils.cpp
@@ -63,7 +63,7 @@ scoped_c_thread_locale::xplat_locale scoped_c_thread_locale::c_locale()
63
scoped_c_thread_locale::xplat_locale *clocale = new scoped_c_thread_locale::xplat_locale();
64
#ifdef _WIN32
65
*clocale = _create_locale(LC_ALL, "C");
66
- if (*clocale == nullptr)
+ if (clocale == nullptr || *clocale == nullptr)
67
{
68
throw std::runtime_error("Unable to create 'C' locale.");
69
}
@@ -74,7 +74,7 @@ scoped_c_thread_locale::xplat_locale scoped_c_thread_locale::c_locale()
74
};
75
#else
76
*clocale = newlocale(LC_ALL, "C", nullptr);
77
78
79
80
0 commit comments