summaryrefslogtreecommitdiff
path: root/indra/llxml/llcontrol.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llxml/llcontrol.h')
-rw-r--r--indra/llxml/llcontrol.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h
index 19508becc3..0839c02c50 100644
--- a/indra/llxml/llcontrol.h
+++ b/indra/llxml/llcontrol.h
@@ -247,6 +247,7 @@ public:
// generic getter
template<typename T> T get(const std::string& name)
{
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_LLSD;
LLControlVariable* control = getControl(name);
LLSD value;
eControlType type = TYPE_COUNT;
@@ -405,8 +406,8 @@ public:
const T& default_value,
const std::string& comment = "Declared In Code")
{
- mCachedControlPtr = LLControlCache<T>::getInstance(name);
- if (mCachedControlPtr.isNull())
+ mCachedControlPtr = LLControlCache<T>::getInstance(name).get();
+ if (! mCachedControlPtr)
{
mCachedControlPtr = new LLControlCache<T>(group, name, default_value, comment);
}
@@ -415,8 +416,8 @@ public:
LLCachedControl(LLControlGroup& group,
const std::string& name)
{
- mCachedControlPtr = LLControlCache<T>::getInstance(name);
- if (mCachedControlPtr.isNull())
+ mCachedControlPtr = LLControlCache<T>::getInstance(name).get();
+ if (! mCachedControlPtr)
{
mCachedControlPtr = new LLControlCache<T>(group, name);
}