summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-03-09 21:37:02 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-03-09 22:40:32 +0200
commita1d2b94b4c06c6ea33bf7f76c4c07578d26845f9 (patch)
tree8269d2cf6d16889be425ad43041d1663c6daa987 /indra
parentec824a16d54dad262e3fca34a3c5d4326ddc1680 (diff)
SL-14807 Viewer crashes when creating an experience
Opening already open and recently created experience was crashing viewer due to viewer treating 'edit_experience' as part of floater's key.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterexperienceprofile.cpp14
-rw-r--r--indra/newview/llfloaterexperienceprofile.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp
index 2c9a8e64b7..a99a096ea7 100644
--- a/indra/newview/llfloaterexperienceprofile.cpp
+++ b/indra/newview/llfloaterexperienceprofile.cpp
@@ -211,6 +211,20 @@ bool LLFloaterExperienceProfile::experiencePermission( LLHandle<LLFloaterExperie
return false;
}
+bool LLFloaterExperienceProfile::matchesKey(const LLSD& key)
+{
+ if (key.has("experience_id"))
+ {
+ return mExperienceId == key["experience_id"].asUUID();
+ }
+ else if (key.isUUID())
+ {
+ return mExperienceId == key.asUUID();
+ }
+ // Assume NULL uuid
+ return mExperienceId.isNull();
+}
+
void LLFloaterExperienceProfile::onClickEdit()
{
diff --git a/indra/newview/llfloaterexperienceprofile.h b/indra/newview/llfloaterexperienceprofile.h
index 1394418d91..f9b6e2e2eb 100644
--- a/indra/newview/llfloaterexperienceprofile.h
+++ b/indra/newview/llfloaterexperienceprofile.h
@@ -51,6 +51,8 @@ public:
LLFloaterExperienceProfile(const LLSD& data);
virtual ~LLFloaterExperienceProfile();
+
+ /* virtual */ bool matchesKey(const LLSD& key);
LLUUID getExperienceId() const { return mExperienceId; }
void setPreferences( const LLSD& content );