Some assertions, just in case.
This commit is contained in:
@@ -1908,7 +1908,12 @@ BOOL LLDataPackerAsciiFile::getValueStr(const char *name, char *out_value, S32 v
|
||||
if (mFP)
|
||||
{
|
||||
fpos_t last_pos;
|
||||
fgetpos(mFP, &last_pos);
|
||||
if (0 != fgetpos(mFP, &last_pos)) // 0==success for fgetpos
|
||||
{
|
||||
llwarns << "Data packer failed to fgetpos" << llendl;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (fgets(buffer, DP_BUFSIZE, mFP) == NULL)
|
||||
{
|
||||
buffer[0] = '\0';
|
||||
|
||||
@@ -1041,7 +1041,11 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat
|
||||
mPartitionType = LLViewerRegion::PARTITION_VOLUME;
|
||||
|
||||
mOctree->balance();
|
||||
|
||||
llassert(mDrawable);
|
||||
llassert(mDrawable->getRegion());
|
||||
LLSpatialPartition *part = mDrawable->getRegion()->getSpatialPartition(mPartitionType);
|
||||
llassert(part);
|
||||
|
||||
if (part)
|
||||
{
|
||||
@@ -1360,6 +1364,9 @@ void LLSpatialBridge::move(LLDrawable *drawablep, LLSpatialGroup *curp, BOOL imm
|
||||
|
||||
BOOL LLSpatialBridge::updateMove()
|
||||
{
|
||||
llassert_always(mDrawable);
|
||||
llassert_always(mDrawable->mVObjp);
|
||||
llassert_always(mDrawable->getRegion());
|
||||
LLSpatialPartition* part = mDrawable->getRegion()->getSpatialPartition(mPartitionType);
|
||||
llassert_always(part);
|
||||
mOctree->balance();
|
||||
|
||||
@@ -299,8 +299,11 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask)
|
||||
for (LLCullResult::sg_list_t::iterator i = gPipeline.beginAlphaGroups(); i != gPipeline.endAlphaGroups(); ++i)
|
||||
{
|
||||
LLSpatialGroup* group = *i;
|
||||
llassert(group);
|
||||
llassert(group->mSpatialPartition);
|
||||
|
||||
if (group->mSpatialPartition->mRenderByGroup &&
|
||||
!group->isDead())
|
||||
!group->isDead())
|
||||
{
|
||||
bool draw_glow_for_this_partition = mVertexShaderLevel > 0 && // no shaders = no glow.
|
||||
// All particle systems seem to come off the wire with texture entries which claim that they glow. This is probably a bug in the data. Suppress.
|
||||
|
||||
@@ -356,12 +356,14 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
|
||||
normal %= c2;
|
||||
normal.normVec();
|
||||
|
||||
llassert(mDataNorm);
|
||||
*(mDataNorm + surface_stride * y + x) = normal;
|
||||
}
|
||||
|
||||
const LLVector3 &LLSurfacePatch::getNormal(const U32 x, const U32 y) const
|
||||
{
|
||||
U32 surface_stride = mSurfacep->getGridsPerEdge();
|
||||
llassert(mDataNorm);
|
||||
return *(mDataNorm + surface_stride * y + x);
|
||||
}
|
||||
|
||||
@@ -403,6 +405,7 @@ void LLSurfacePatch::updateVerticalStats()
|
||||
U32 i, j, k;
|
||||
F32 z, total;
|
||||
|
||||
llassert(mDataZ);
|
||||
z = *(mDataZ);
|
||||
|
||||
mMinZ = z;
|
||||
|
||||
Reference in New Issue
Block a user