diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2013-10-01 10:56:30 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2013-10-01 10:56:30 -0600 |
commit | a5a1b81af28b16406687df3550730a436155589f (patch) | |
tree | e496906c7b9d74dc00dd23fd66e73f1af61b35f3 /indra/newview/llvieweroctree.cpp | |
parent | 2fad2cc7365803b63bfe2466da2558182a1c25b9 (diff) |
fix for SH-4521: Interesting viewer crash in Pipeline:RenderDrawPools
Diffstat (limited to 'indra/newview/llvieweroctree.cpp')
-rw-r--r-- | indra/newview/llvieweroctree.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp index e1684c19df..e8eba43242 100644 --- a/indra/newview/llvieweroctree.cpp +++ b/indra/newview/llvieweroctree.cpp @@ -809,7 +809,14 @@ class LLSpatialSetOcclusionState : public OctreeTraveler public: U32 mState; LLSpatialSetOcclusionState(U32 state) : mState(state) { } - virtual void visit(const OctreeNode* branch) { ((LLOcclusionCullingGroup*) branch->getListener(0))->setOcclusionState(mState); } + virtual void visit(const OctreeNode* branch) + { + LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)branch->getListener(0); + if(group) + { + group->setOcclusionState(mState); + } + } }; class LLSpatialSetOcclusionStateDiff : public LLSpatialSetOcclusionState @@ -821,7 +828,7 @@ public: { LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*) n->getListener(0); - if (!group->isOcclusionState(mState)) + if (group && !group->isOcclusionState(mState)) { OctreeTraveler::traverse(n); } @@ -945,7 +952,14 @@ public: U32 mState; LLSpatialClearOcclusionState(U32 state) : mState(state) { } - virtual void visit(const OctreeNode* branch) { ((LLOcclusionCullingGroup*) branch->getListener(0))->clearOcclusionState(mState); } + virtual void visit(const OctreeNode* branch) + { + LLOcclusionCullingGroup* group = (LLOcclusionCullingGroup*)branch->getListener(0); + if(group) + { + group->clearOcclusionState(mState); + } + } }; class LLSpatialClearOcclusionStateDiff : public LLSpatialClearOcclusionState |