diff --git a/uppsrc/Core/Value.hpp b/uppsrc/Core/Value.hpp index 6636c8012..2ae4ebb8c 100644 --- a/uppsrc/Core/Value.hpp +++ b/uppsrc/Core/Value.hpp @@ -279,8 +279,13 @@ int Value::Compare(const Value& v) const template const T& GetStaticNull() { - static T q; - return q; + static T *q; + ONCELOCK { + static T x; + SetNull(x); + q = &x; + } + return *q; } template