summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
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);
+ }
}
- });
+ });
}
}