From 54cced235647a658cd8ed371314acc84f770e6bc Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 9 Feb 2011 10:33:07 -0700 Subject: debug code for SH-924: [PUBLIC-JIRA-USERS] Viewer crash in LLSurface::getWaterHeight --- indra/newview/llviewerobjectlist.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 970cc2e2a7..5d6c738c6d 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1124,6 +1124,22 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset) LLWorld::getInstance()->shiftRegions(offset); } +//debug code +bool LLViewerObjectList::hasMapObjectInRegion(LLViewerRegion* regionp) +{ + for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) + { + LLViewerObject* objectp = *iter; + + if(objectp->isDead() || objectp->getRegion() == regionp) + { + return true ; + } + } + + return false ; +} + void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) { LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" ); @@ -1142,6 +1158,9 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap) for (vobj_list_t::iterator iter = mMapObjects.begin(); iter != mMapObjects.end(); ++iter) { LLViewerObject* objectp = *iter; + + llassert_always(!objectp->isDead()); + if (!objectp->getRegion() || objectp->isOrphaned() || objectp->isAttachment()) { continue; -- cgit v1.2.3 From 8d43cb270185a53e0a419f7cd52af583129bbbde Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 9 Feb 2011 12:15:21 -0700 Subject: trivial: remove some redundant code. --- indra/newview/llviewerobjectlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerobjectlist.cpp') diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 5d6c738c6d..82bc164021 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1448,7 +1448,7 @@ LLViewerObject *LLViewerObjectList::replaceObject(const LLUUID &id, const LLPCod LLViewerObject *old_instance = findObject(id); if (old_instance) { - cleanupReferences(old_instance); + //cleanupReferences(old_instance); old_instance->markDead(); return createObject(pcode, regionp, id, old_instance->getLocalID(), LLHost()); -- cgit v1.2.3