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.
master
Andrey Kleshchev 2021-03-09 21:37:02 +02:00
parent ec824a16d5
commit a1d2b94b4c
2 changed files with 16 additions and 0 deletions

View File

@ -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()
{

View File

@ -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 );