Commits

Anonymous committed 54e9b43

Crashfix: LLVOVolume::calcLOD make sure avatar and avatar->mDrawable are valid.

Comments (0)

Files changed (1)

indra/newview/llvovolume.cpp

 	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();
 	}