summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp20
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 98f842902d..6698ee7505 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -101,7 +101,7 @@ LLColor4 LLSelectMgr::sHighlightParentColor;
LLColor4 LLSelectMgr::sHighlightChildColor;
LLColor4 LLSelectMgr::sContextSilhouetteColor;
-static LLObjectSelection* get_null_object_selection();
+static LLObjectSelection *get_null_object_selection();
template<>
const LLHandle<LLObjectSelection>::NullFunc
LLHandle<LLObjectSelection>::sNullFunc = get_null_object_selection;
@@ -125,14 +125,26 @@ struct LLDeRezInfo
//
+static LLPointer<LLObjectSelection> sNullSelection;
+
//
// Functions
//
-LLObjectSelection* get_null_object_selection()
+void LLSelectMgr::cleanupGlobals()
+{
+ delete gSelectMgr;
+ gSelectMgr = NULL;
+ sNullSelection = NULL;
+}
+
+LLObjectSelection *get_null_object_selection()
{
- static LLObjectSelection null_selection;
- return &null_selection;;
+ if (sNullSelection.isNull())
+ {
+ sNullSelection = new LLObjectSelection;
+ }
+ return sNullSelection;
}