diff --git a/indra/newview/llsky.cpp b/indra/newview/llsky.cpp index 38da8f28686955f4d3f8c70979865c993f8e5196..e9eb02e45ef2f4c2fa8ff153bf702850137bcb79 100644 --- a/indra/newview/llsky.cpp +++ b/indra/newview/llsky.cpp @@ -119,7 +119,7 @@ void LLSky::restoreGL() void LLSky::resetVertexBuffers() { - if (gSky.mVOSkyp.notNull()) + if (gSky.mVOSkyp.notNull() && gSky.mVOGroundp.notNull()) { gPipeline.resetVertexBuffers(gSky.mVOSkyp->mDrawable); gPipeline.resetVertexBuffers(gSky.mVOGroundp->mDrawable); diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index 7f1a0feb27623c80e9d752e3c968466432beea43..922feff780956c4eaefa489dd24e1fadc2574c3b 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -201,7 +201,7 @@ LLVector2 LLSurfacePatch::getTexCoords(const U32 x, const U32 y) const void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3 *vertex, LLVector3 *normal, LLVector2 *tex0, LLVector2 *tex1) { - if (!mSurfacep || !mSurfacep->getRegion() || !mSurfacep->getGridsPerEdge()) + if (!mSurfacep || !mSurfacep->getRegion() || !mSurfacep->getGridsPerEdge() || !mVObjp) { return; // failsafe } diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h index 8390ec8b06fa7467bbcc2f3185e4592a439fa038..03194816759e4432c0f9cb9c501fc891e57e7c7b 100644 --- a/indra/newview/llworld.h +++ b/indra/newview/llworld.h @@ -245,7 +245,7 @@ private: // Data for "Fake" objects // - std::list<LLVOWater*> mHoleWaterObjects; + std::list<LLPointer<LLVOWater> > mHoleWaterObjects; LLPointer<LLVOWater> mEdgeWaterObjects[8]; LLPointer<LLViewerTexture> mDefaultWaterTexturep;