From abb607a65e8a3f9328a0ce97fa5d3d08a75338ef Mon Sep 17 00:00:00 2001 From: "Karl Stiefvater (qarl)" Date: Fri, 25 Jun 2010 09:59:20 -0500 Subject: EXT-7446 Spatial Partition Crash. reviewed by Richard. --- indra/newview/llviewerobject.cpp | 5 +++++ indra/newview/llviewerobjectlist.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index ee89680fea..9027caa4ce 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -4928,6 +4928,11 @@ void LLViewerObject::setIncludeInSearch(bool include_in_search) void LLViewerObject::setRegion(LLViewerRegion *regionp) { + if (!regionp) + { + llwarns << "viewer object set region to NULL" << llendl; + } + mLatestRecvPacketID = 0; mRegionp = regionp; diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 752aeaaab0..fc94fbafac 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -894,10 +894,10 @@ void LLViewerObjectList::removeDrawable(LLDrawable* drawablep) BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) { - // Don't ever kill gAgentAvatarp, just mark it as null region instead. + // Don't ever kill gAgentAvatarp, just force it to the agent's region if (objectp == gAgentAvatarp) { - objectp->setRegion(NULL); + objectp->setRegion(gAgent.getRegion()); return FALSE; } -- cgit v1.2.3