summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-13 13:49:08 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-13 13:49:08 +0000
commit710687ce6751dab6afec76b2bc2a4d03568e44ec (patch)
tree1e5a22375c767c30d90d3cc447a87c946d63fc53
parent51e2ee7b3a9d8a4a10373edd1ee99e7ee25e8a38 (diff)
CID-208
Checker: REVERSE_INULL Function: LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup *) File: /indra/newview/llvovolume.cpp
-rw-r--r--indra/newview/llvovolume.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 12728a2377..9fbcd1d32a 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3494,7 +3494,8 @@ static LLFastTimer::DeclareTimer FTM_VOLUME_GEOM("Volume Geometry");
void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
{
llpushcallstacks ;
- if (group->isState(LLSpatialGroup::MESH_DIRTY) && !group->isState(LLSpatialGroup::GEOM_DIRTY))
+ llassert(group);
+ if (group && group->isState(LLSpatialGroup::MESH_DIRTY) && !group->isState(LLSpatialGroup::GEOM_DIRTY))
{
LLFastTimer tm(FTM_VOLUME_GEOM);
S32 num_mapped_veretx_buffer = LLVertexBuffer::sMappedCount ;
@@ -3548,9 +3549,9 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
}
// don't forget alpha
- if( group != NULL &&
- !group->mVertexBuffer.isNull() &&
- group->mVertexBuffer->isLocked())
+ if(group != NULL &&
+ !group->mVertexBuffer.isNull() &&
+ group->mVertexBuffer->isLocked())
{
group->mVertexBuffer->setBuffer(0);
}
@@ -3576,7 +3577,7 @@ void LLVolumeGeometryManager::rebuildMesh(LLSpatialGroup* group)
group->clearState(LLSpatialGroup::MESH_DIRTY | LLSpatialGroup::NEW_DRAWINFO);
}
- if (group->isState(LLSpatialGroup::NEW_DRAWINFO))
+ if (group && group->isState(LLSpatialGroup::NEW_DRAWINFO))
{
llerrs << "WTF?" << llendl;
}