summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-05-20 11:35:24 -0400
committerGitHub <noreply@github.com>2026-05-20 11:35:24 -0400
commit491b0b32c74e2186dd34f9be8513bb08d390dfe2 (patch)
treefdd37805842de5ba6f3db69c5699b727388ff50a /indra/llui
parentcd2dd394b95361a6a274670c7b7ee8c6f2cf8979 (diff)
parentd53041d9ea1687febf2d9e7c38ac5d4be3c8eae0 (diff)
Merge pull request #5842 from secondlife/release/2026.03
Release/2026.03
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/lluictrlfactory.cpp2
-rw-r--r--indra/llui/lluictrlfactory.h11
2 files changed, 9 insertions, 4 deletions
diff --git a/indra/llui/lluictrlfactory.cpp b/indra/llui/lluictrlfactory.cpp
index 33ffc3dfc6..740f187ed8 100644
--- a/indra/llui/lluictrlfactory.cpp
+++ b/indra/llui/lluictrlfactory.cpp
@@ -67,7 +67,7 @@ public:
static LLDefaultChildRegistry::Register<LLUICtrlLocate> r1("locate");
// Build time optimization, generate this once in .cpp file
-template class LLUICtrlFactory* LLSingleton<class LLUICtrlFactory>::getInstance();
+template class LLUICtrlFactory* LLSimpleton<class LLUICtrlFactory>::getInstance();
//-----------------------------------------------------------------------------
// LLUICtrlFactory()
diff --git a/indra/llui/lluictrlfactory.h b/indra/llui/lluictrlfactory.h
index f44b4ba4dc..75cee5f004 100644
--- a/indra/llui/lluictrlfactory.h
+++ b/indra/llui/lluictrlfactory.h
@@ -81,12 +81,13 @@ class LLWidgetNameRegistry
// Build time optimization, generate this once in .cpp file
#ifndef LLUICTRLFACTORY_CPP
-extern template class LLUICtrlFactory* LLSingleton<class LLUICtrlFactory>::getInstance();
+extern template class LLUICtrlFactory* LLSimpleton<class LLUICtrlFactory>::getInstance();
#endif
-class LLUICtrlFactory : public LLSingleton<LLUICtrlFactory>
+class LLUICtrlFactory : public LLSimpleton<LLUICtrlFactory>
{
- LLSINGLETON(LLUICtrlFactory);
+public:
+ LLUICtrlFactory();
~LLUICtrlFactory();
// only partial specialization allowed in inner classes, so use extra dummy parameter
@@ -313,6 +314,10 @@ template<typename T>
LLChildRegistry<DERIVED>::Register<T>::Register(const char* tag, LLWidgetCreatorFunc func)
: LLChildRegistry<DERIVED>::StaticRegistrar(tag, func == nullptr ? (LLWidgetCreatorFunc)&LLUICtrlFactory::defaultBuilder<T> : func)
{
+ if (!LLUICtrlFactory::instanceExists())
+ {
+ LLUICtrlFactory::createInstance();
+ }
// add this widget to various registries
LLUICtrlFactory::instance().registerWidget(typeid(T), typeid(typename T::Params), tag);