summaryrefslogtreecommitdiff
path: root/indra/llui/llhandle.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llhandle.h')
-rw-r--r--indra/llui/llhandle.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/llui/llhandle.h b/indra/llui/llhandle.h
index 10a7fd4544..899f6b9326 100644
--- a/indra/llui/llhandle.h
+++ b/indra/llui/llhandle.h
@@ -60,7 +60,7 @@ template <typename T>
class LLHandle
{
public:
- LLHandle() : mTombStone(sDefaultTombStone) {}
+ LLHandle() : mTombStone(getDefaultTombStone()) {}
const LLHandle<T>& operator =(const LLHandle<T>& other)
{
mTombStone = other.mTombStone;
@@ -74,7 +74,7 @@ public:
void markDead()
{
- mTombStone = sDefaultTombStone;
+ mTombStone = getDefaultTombStone();
}
T* get() const
@@ -104,13 +104,13 @@ protected:
LLPointer<LLTombStone<T> > mTombStone;
private:
- static LLPointer<LLTombStone<T> > sDefaultTombStone;
+ static LLPointer<LLTombStone<T> >& getDefaultTombStone()
+ {
+ static LLPointer<LLTombStone<T> > sDefaultTombStone = new LLTombStone<T>;
+ return sDefaultTombStone;
+ }
};
-// initialize static "empty" tombstone pointer
-template <typename T> LLPointer<LLTombStone<T> > LLHandle<T>::sDefaultTombStone = new LLTombStone<T>();
-
-
template <typename T>
class LLRootHandle : public LLHandle<T>
{