aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerobjectlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerobjectlist.cpp34
1 files changed, 23 insertions, 11 deletions
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp
index 163b039..f3d7bd9 100644
--- a/linden/indra/newview/llviewerobjectlist.cpp
+++ b/linden/indra/newview/llviewerobjectlist.cpp
@@ -163,15 +163,20 @@ U64 LLViewerObjectList::getIndex(const U32 local_id,
163 163
164BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) 164BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object)
165{ 165{
166 U32 local_id = object.mLocalID; 166 if(object.getRegion())
167 LLHost region_host = object.getRegion()->getHost(); 167 {
168 U32 ip = region_host.getAddress(); 168 U32 local_id = object.mLocalID;
169 U32 port = region_host.getPort(); 169 LLHost region_host = object.getRegion()->getHost();
170 U64 ipport = (((U64)ip) << 32) | (U64)port; 170 U32 ip = region_host.getAddress();
171 U32 index = sIPAndPortToIndex[ipport]; 171 U32 port = region_host.getPort();
172 U64 ipport = (((U64)ip) << 32) | (U64)port;
173 U32 index = sIPAndPortToIndex[ipport];
174
175 U64 indexid = (((U64)index) << 32) | (U64)local_id;
176 return sIndexAndLocalIDToUUID.erase(indexid) > 0 ? TRUE : FALSE;
177 }
172 178
173 U64 indexid = (((U64)index) << 32) | (U64)local_id; 179 return FALSE ;
174 return sIndexAndLocalIDToUUID.erase(indexid) > 0 ? TRUE : FALSE;
175} 180}
176 181
177void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, 182void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id,
@@ -822,8 +827,15 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep)
822 827
823 for (S32 i = 0; i < drawablep->getNumFaces(); i++) 828 for (S32 i = 0; i < drawablep->getNumFaces(); i++)
824 { 829 {
825 LLViewerObject* objectp = drawablep->getFace(i)->getViewerObject(); 830 LLFace* facep = drawablep->getFace(i) ;
826 mSelectPickList.erase(objectp); 831 if(facep)
832 {
833 LLViewerObject* objectp = facep->getViewerObject();
834 if(objectp)
835 {
836 mSelectPickList.erase(objectp);
837 }
838 }
827 } 839 }
828} 840}
829 841
@@ -898,7 +910,7 @@ void LLViewerObjectList::killAllObjects()
898 if (!mMapObjects.empty()) 910 if (!mMapObjects.empty())
899 { 911 {
900 llwarns << "Some objects still on map object list!" << llendl; 912 llwarns << "Some objects still on map object list!" << llendl;
901 mActiveObjects.clear(); 913 mMapObjects.clear();
902 } 914 }
903} 915}
904 916