aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llselectmgr.cpp')
-rw-r--r--linden/indra/newview/llselectmgr.cpp8
1 files changed, 6 insertions, 2 deletions
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 &
1134 { 1134 {
1135 // this means this object *has* to be an attachment 1135 // this means this object *has* to be an attachment
1136 LLXform* attachment_point_xform = first_object->getRootEdit()->mDrawable->mXform.getParent(); 1136 LLXform* attachment_point_xform = first_object->getRootEdit()->mDrawable->mXform.getParent();
1137 mGridOrigin = attachment_point_xform->getWorldPosition(); 1137 // 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.
1138 mGridRotation = attachment_point_xform->getWorldRotation(); 1138 if (attachment_point_xform)
1139 {
1140 mGridOrigin = attachment_point_xform->getWorldPosition();
1141 mGridRotation = attachment_point_xform->getWorldRotation();
1142 }
1139 mGridScale = LLVector3(1.f, 1.f, 1.f) * gSavedSettings.getF32("GridResolution"); 1143 mGridScale = LLVector3(1.f, 1.f, 1.f) * gSavedSettings.getF32("GridResolution");
1140 } 1144 }
1141 break; 1145 break;