From a36573214b729bfd461ac5913936ed9aafc1a3fa Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Tue, 5 Apr 2011 00:07:38 -0700 Subject: Fixed viewer crash when hair etc. is attached to the HUD, ported from Singularity, patch by Tom Meta --- linden/indra/newview/llselectmgr.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index b0a6834..f1092e7 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp @@ -1134,8 +1134,11 @@ 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(); + 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