diff options
Diffstat (limited to 'linden/indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | linden/indra/newview/llviewerobjectlist.cpp | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/linden/indra/newview/llviewerobjectlist.cpp b/linden/indra/newview/llviewerobjectlist.cpp index 4fac9bc..9b85fec 100644 --- a/linden/indra/newview/llviewerobjectlist.cpp +++ b/linden/indra/newview/llviewerobjectlist.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2001-2008, Linden Research, Inc. | 7 | * Copyright (c) 2001-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -163,15 +163,20 @@ U64 LLViewerObjectList::getIndex(const U32 local_id, | |||
163 | 163 | ||
164 | BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object) | 164 | BOOL 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 | ||
177 | void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id, | 182 | void 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 | ||
@@ -902,7 +914,7 @@ void LLViewerObjectList::killAllObjects() | |||
902 | if (!mMapObjects.empty()) | 914 | if (!mMapObjects.empty()) |
903 | { | 915 | { |
904 | llwarns << "Some objects still on map object list!" << llendl; | 916 | llwarns << "Some objects still on map object list!" << llendl; |
905 | mActiveObjects.clear(); | 917 | mMapObjects.clear(); |
906 | } | 918 | } |
907 | } | 919 | } |
908 | 920 | ||