summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobjectlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r--indra/newview/llviewerobjectlist.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index a221086367..ab06a0f4fb 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -163,15 +163,20 @@ U64 LLViewerObjectList::getIndex(const U32 local_id,
BOOL LLViewerObjectList::removeFromLocalIDTable(const LLViewerObject &object)
{
- U32 local_id = object.mLocalID;
- LLHost region_host = object.getRegion()->getHost();
- U32 ip = region_host.getAddress();
- U32 port = region_host.getPort();
- U64 ipport = (((U64)ip) << 32) | (U64)port;
- U32 index = sIPAndPortToIndex[ipport];
+ if(object.getRegion())
+ {
+ U32 local_id = object.mLocalID;
+ LLHost region_host = object.getRegion()->getHost();
+ U32 ip = region_host.getAddress();
+ U32 port = region_host.getPort();
+ U64 ipport = (((U64)ip) << 32) | (U64)port;
+ U32 index = sIPAndPortToIndex[ipport];
+
+ U64 indexid = (((U64)index) << 32) | (U64)local_id;
+ return sIndexAndLocalIDToUUID.erase(indexid) > 0 ? TRUE : FALSE;
+ }
- U64 indexid = (((U64)index) << 32) | (U64)local_id;
- return sIndexAndLocalIDToUUID.erase(indexid) > 0 ? TRUE : FALSE;
+ return FALSE ;
}
void LLViewerObjectList::setUUIDAndLocal(const LLUUID &id,