diff options
author | Nicky <none@none> | 2012-07-13 13:46:38 +0200 |
---|---|---|
committer | Nicky <none@none> | 2012-07-13 13:46:38 +0200 |
commit | 85025ffc7be40c0953ca8905f149701b4b8f568f (patch) | |
tree | 4b3a31227a87019783bf3ed0b52ca7649656333f /indra | |
parent | c0e8656477e41fffa26be9a23bef1c5bb1357330 (diff) |
Crashfix: LLVOVolume::calcLOD make sure avatar and avatar->mDrawable are valid.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llvovolume.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index afe62bbb2e..49513eb206 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -1227,6 +1227,13 @@ BOOL LLVOVolume::calcLOD() if (mDrawable->isState(LLDrawable::RIGGED)) { LLVOAvatar* avatar = getAvatar(); + + // Not sure how this can really happen, but alas it does. Better exit here than crashing. + if( !avatar || !avatar->mDrawable ) + { + return FALSE; + } + distance = avatar->mDrawable->mDistanceWRTCamera; radius = avatar->getBinRadius(); } |