Fix an edge case where the radar could now crash loop, woops.

Thanks to Deltek and Router Gray for reporting and testing! <3
This commit is contained in:
Lirusaito
2019-01-21 23:38:06 -05:00
parent 54cf0a6a91
commit d0b7a983d1
2 changed files with 6 additions and 2 deletions

View File

@@ -147,7 +147,7 @@ LLAvatarListEntry::LLAvatarListEntry(const LLUUID& id, const std::string& name,
LLAvatarListEntry::~LLAvatarListEntry()
{
static LLCachedControl<bool> radar_alert_flood_leaving(gSavedSettings, "RadarAlertFloodLeaving");
bool cleanup = LLFloaterAvatarList::instance().isCleanup();
bool cleanup = LLFloaterAvatarList::isCleanup();
if (radar_alert_flood_leaving || !cleanup)
{
setPosition(mPosition, F32_MIN, false, cleanup); // Dead and gone

View File

@@ -328,7 +328,11 @@ public:
*/
void expireAvatarList(const std::list<LLUUID>& ids);
void updateAvatarSorting();
bool isCleanup() const { return mCleanup; }
static bool isCleanup()
{
const auto& inst = getIfExists();
return inst && inst->mCleanup;
}
private:
void setFocusAvatarInternal(const LLUUID& id);