diff options
author | Jacek Antonelli | 2008-09-17 16:26:05 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-17 16:26:05 -0500 |
commit | fd2b7a69832f36bff3ea0c9f5ecfe96e5bb42f66 (patch) | |
tree | b5dbe36399c79645623e083cbdb9330179e85004 /linden/indra/newview | |
parent | Merge branch 'VWR-2685' into nicholaz-patches (diff) | |
parent | VWR-2683: Possible crash accessing dead llviewerregion. (diff) | |
download | meta-impy-fd2b7a69832f36bff3ea0c9f5ecfe96e5bb42f66.zip meta-impy-fd2b7a69832f36bff3ea0c9f5ecfe96e5bb42f66.tar.gz meta-impy-fd2b7a69832f36bff3ea0c9f5ecfe96e5bb42f66.tar.bz2 meta-impy-fd2b7a69832f36bff3ea0c9f5ecfe96e5bb42f66.tar.xz |
Merge branch 'VWR-2683' into nicholaz-patches
Diffstat (limited to 'linden/indra/newview')
-rw-r--r-- | linden/indra/newview/llfloateractivespeakers.cpp | 4 | ||||
-rw-r--r-- | linden/indra/newview/llviewerobjectlist.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/linden/indra/newview/llfloateractivespeakers.cpp b/linden/indra/newview/llfloateractivespeakers.cpp index ed2f9f8..9aa21d5 100644 --- a/linden/indra/newview/llfloateractivespeakers.cpp +++ b/linden/indra/newview/llfloateractivespeakers.cpp | |||
@@ -1342,7 +1342,7 @@ void LLLocalSpeakerMgr::updateSpeakerList() | |||
1342 | for(avatar_it = LLCharacter::sInstances.begin(); avatar_it != LLCharacter::sInstances.end(); ++avatar_it) | 1342 | for(avatar_it = LLCharacter::sInstances.begin(); avatar_it != LLCharacter::sInstances.end(); ++avatar_it) |
1343 | { | 1343 | { |
1344 | LLVOAvatar* avatarp = (LLVOAvatar*)*avatar_it; | 1344 | LLVOAvatar* avatarp = (LLVOAvatar*)*avatar_it; |
1345 | if (dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) <= CHAT_NORMAL_RADIUS) | 1345 | if (!avatarp->isDead() && dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) <= CHAT_NORMAL_RADIUS) |
1346 | { | 1346 | { |
1347 | setSpeaker(avatarp->getID()); | 1347 | setSpeaker(avatarp->getID()); |
1348 | } | 1348 | } |
@@ -1356,7 +1356,7 @@ void LLLocalSpeakerMgr::updateSpeakerList() | |||
1356 | if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) | 1356 | if (speakerp->mStatus == LLSpeaker::STATUS_TEXT_ONLY) |
1357 | { | 1357 | { |
1358 | LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id); | 1358 | LLVOAvatar* avatarp = (LLVOAvatar*)gObjectList.findObject(speaker_id); |
1359 | if (!avatarp || dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS) | 1359 | if (!avatarp || avatarp->isDead() || dist_vec(avatarp->getPositionAgent(), gAgent.getPositionAgent()) > CHAT_NORMAL_RADIUS) |
1360 | { | 1360 | { |
1361 | speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; | 1361 | speakerp->mStatus = LLSpeaker::STATUS_NOT_IN_CHANNEL; |
1362 | speakerp->mDotColor = INACTIVE_COLOR; | 1362 | speakerp->mDotColor = INACTIVE_COLOR; |
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index bd8ed97..dec7ced 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp | |||
@@ -859,6 +859,10 @@ void LLViewerObjectList::killObjects(LLViewerRegion *regionp) | |||
859 | if (objectp->mRegionp == regionp) | 859 | if (objectp->mRegionp == regionp) |
860 | { | 860 | { |
861 | killObject(objectp); | 861 | killObject(objectp); |
862 | |||
863 | // invalidate region pointer. region will become invalid, but | ||
864 | // refcounted objects may survive the cleanDeadObjects() call below | ||
865 | objectp->mRegionp = NULL; | ||
862 | } | 866 | } |
863 | } | 867 | } |
864 | 868 | ||