summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-06-27 18:53:47 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-06-27 20:59:31 +0300
commit86cc076ab561a45a124db25acdb82cfead4749a8 (patch)
tree4672792d9cd92bd7f6b3e5e58b3b6b7e249223cf /indra
parent9235312990b07314758ff1fc4825958d7ee74896 (diff)
#4300 Crash at readProfileQuery
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoavatar.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 051f0721bf..bee3af4632 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -11782,16 +11782,24 @@ void LLVOAvatar::readProfileQuery(S32 retries)
}
else
- { // wait until next frame
- LLUUID id = getID();
+ {
+ // wait until next frame
+ const LLUUID id = getID();
- LL::WorkQueue::getInstance("mainloop")->post([id, retries] {
- LLVOAvatar* avatar = (LLVOAvatar*) gObjectList.findObject(id);
- if(avatar)
+ LL::WorkQueue::getInstance("mainloop")->post([id, retries]
+ {
+ LLViewerObject* object = gObjectList.findObject(id);
+ if (object
+ && !object->isDead()
+ && object->isAvatar()) // probably excessive, pcode isn't supposed to change
{
- avatar->readProfileQuery(retries);
+ LLVOAvatar* avatar = (LLVOAvatar*)object;
+ if (avatar)
+ {
+ avatar->readProfileQuery(retries);
+ }
}
- });
+ });
}
}