Project

General

Profile

Bug #14667 » wt-4.11.4-workaround.diff

Massimiliano Ghilardi, 07/13/2026 11:59 AM

View differences:

src/Wt/WLocale.C 2026-07-13 08:42:56.734246537 +0000 → src/Wt/WLocale.C 2026-07-13 08:53:28.330784984 +0000
namespace Wt {
namespace {
thread_local WLocale currentLocale_;
// ~WebSession calls log() -> calls WLocale::currentLocale() -> accesses currentLocale_
// that may be already destroyed.
// Workaround: just use global systemLocale if WApplication::instance() is NULL
// and its WApplication::locale() cannot be accessed
//
// thread_local WLocale currentLocale_;
const WLocale systemLocale;
}
......
if (app)
return app->locale();
else
return currentLocale_;
// return currentLocale_;
return systemLocale;
}
bool WLocale::isDefaultNumberLocale() const
......
if (app) {
app->setLocale(locale);
}
else {
currentLocale_ = locale;
}
// else {
// currentLocale_ = locale;
// }
}
}
    (1-1/1)