File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -60,23 +60,25 @@ scoped_c_thread_locale::xplat_locale scoped_c_thread_locale::c_locale()
6060 scoped_c_thread_locale::xplat_locale *clocale = new scoped_c_thread_locale::xplat_locale ();
6161#ifdef _WIN32
6262 *clocale = _create_locale (LC_ALL, " C" );
63- if (clocale == nullptr )
63+ if (* clocale == nullptr )
6464 {
6565 throw std::runtime_error (" Unable to create 'C' locale." );
6666 }
6767 auto deleter = [](scoped_c_thread_locale::xplat_locale *clocale)
6868 {
6969 _free_locale (*clocale);
70+ delete clocale;
7071 };
7172#else
7273 *clocale = newlocale (LC_ALL, " C" , nullptr );
73- if (clocale == nullptr )
74+ if (* clocale == nullptr )
7475 {
7576 throw std::runtime_error (" Unable to create 'C' locale." );
7677 }
7778 auto deleter = [](scoped_c_thread_locale::xplat_locale *clocale)
7879 {
7980 freelocale (*clocale);
81+ delete clocale;
8082 };
8183#endif
8284 g_c_locale = std::unique_ptr<scoped_c_thread_locale::xplat_locale, void (*)(scoped_c_thread_locale::xplat_locale *)>(clocale, deleter);
You can’t perform that action at this time.
0 commit comments