From 50b813b43132ab48125a091ae149aae797d73d4f Mon Sep 17 00:00:00 2001 From: David Seikel Date: Wed, 2 Mar 2011 23:24:45 +1000 Subject: Possible work around for the HUD hair of death server bug. Written by Tom Meta, forward ported from the old meta viewer. --- linden/indra/newview/llselectmgr.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index b0a6834..7d573ea 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp @@ -1134,8 +1134,12 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & { // this means this object *has* to be an attachment LLXform* attachment_point_xform = first_object->getRootEdit()->mDrawable->mXform.getParent(); - mGridOrigin = attachment_point_xform->getWorldPosition(); - mGridRotation = attachment_point_xform->getWorldRotation(); + // But it might be a hair HUD of death. Or maybe a tree? Yes, I know I broke the grammer rules twice in a row, this is source code, English sucks. C++ sucks to, but at least the compiler is not expected to parse comments. + if (attachment_point_xform) + { + mGridOrigin = attachment_point_xform->getWorldPosition(); + mGridRotation = attachment_point_xform->getWorldRotation(); + } mGridScale = LLVector3(1.f, 1.f, 1.f) * gSavedSettings.getF32("GridResolution"); } break; -- cgit v1.1