From b7b2d2b3ee097a4c7c7bc689538a5e0707c2978a Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:31:34 +0000 Subject: CID-152 Checker: NULL_RETURNS Function: LLSpatialBridge::updateMove() File: /indra/newview/lldrawable.cpp --- indra/newview/lldrawable.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d60330024a..f38c92abb5 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1367,10 +1367,14 @@ BOOL LLSpatialBridge::updateMove() { llassert(mDrawable); llassert(mDrawable->getRegion()); - llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType)); + LLSpatialPartition* part = mDrawable->getRegion()->getSpatialPartition(mPartitionType); + llassert(part); mOctree->balance(); - mDrawable->getRegion()->getSpatialPartition(mPartitionType)->move(this, getSpatialGroup(), TRUE); + if (part) + { + part->move(this, getSpatialGroup(), TRUE); + } return TRUE; } -- cgit v1.2.3 From eeb480085809978c8711242d30b660a80ced123b Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 10 Feb 2010 18:43:13 +0000 Subject: CID-130 Checker: NULL_RETURNS Function: LLSpatialBridge::LLSpatialBridge(LLDrawable *, int, unsigned int) File: /indra/newview/lldrawable.cpp --- indra/newview/lldrawable.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index f38c92abb5..9fbc3408d7 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -1049,9 +1049,13 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat llassert(mDrawable); llassert(mDrawable->getRegion()); - llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType)); + LLSpatialPartition *part = mDrawable->getRegion()->getSpatialPartition(mPartitionType); + llassert(part); - mDrawable->getRegion()->getSpatialPartition(mPartitionType)->put(this); + if (part) + { + part->put(this); + } } LLSpatialBridge::~LLSpatialBridge() -- cgit v1.2.3 From 1f672990e796ec55f7b684dbf46f939d1ab15607 Mon Sep 17 00:00:00 2001 From: Palmer Truelson Date: Fri, 12 Feb 2010 21:06:02 -0800 Subject: Backed out davep's optimization pass. changeset 3c3685de430a --- indra/newview/lldrawable.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 244fed791f..d60330024a 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -386,6 +386,8 @@ void LLDrawable::makeActive() mParent->makeActive(); } + gPipeline.setActive(this, TRUE); + //all child objects must also be active llassert_always(mVObjp); @@ -432,6 +434,7 @@ void LLDrawable::makeStatic(BOOL warning_enabled) if (isState(ACTIVE)) { clearState(ACTIVE); + gPipeline.setActive(this, FALSE); if (mParent.notNull() && mParent->isActive() && warning_enabled) { -- cgit v1.2.3 From da79eb5545ae0604bad357d71b54e2381fc480e8 Mon Sep 17 00:00:00 2001 From: Palmer Truelson Date: Tue, 23 Feb 2010 16:48:49 -0800 Subject: Turning on Davep optimizations again. Backed out changeset d89b00b44ab6 --- indra/newview/lldrawable.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/lldrawable.cpp') diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d60330024a..244fed791f 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -386,8 +386,6 @@ void LLDrawable::makeActive() mParent->makeActive(); } - gPipeline.setActive(this, TRUE); - //all child objects must also be active llassert_always(mVObjp); @@ -434,7 +432,6 @@ void LLDrawable::makeStatic(BOOL warning_enabled) if (isState(ACTIVE)) { clearState(ACTIVE); - gPipeline.setActive(this, FALSE); if (mParent.notNull() && mParent->isActive() && warning_enabled) { -- cgit v1.2.3