[FIRE-36090] Fix crash in handleHover accessing null parent
Merged upstream in SLViewer PR#4986master
parent
5fb9e75cd8
commit
b3a549b8b5
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/**
|
||||
* @file llmaniptranslate.cpp
|
||||
* @brief LLManipTranslate class implementation
|
||||
*
|
||||
|
|
@ -715,9 +715,12 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
|
|||
{
|
||||
// handle attachments in local space
|
||||
if (object->isAttachment() && object->mDrawable.notNull())
|
||||
{
|
||||
LLXform* object_xform_parent = object->mDrawable->mXform.getParent();
|
||||
if (object_xform_parent)
|
||||
{
|
||||
// calculate local version of relative move
|
||||
LLQuaternion objWorldRotation = object->mDrawable->mXform.getParent()->getWorldRotation();
|
||||
LLQuaternion objWorldRotation = object_xform_parent->getWorldRotation();
|
||||
objWorldRotation.transQuat();
|
||||
|
||||
LLVector3 old_position_local = object->getPosition();
|
||||
|
|
@ -736,6 +739,7 @@ bool LLManipTranslate::handleHover(S32 x, S32 y, MASK mask)
|
|||
object->resetChildrenPosition(old_position_local - new_position_local, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// compute new position to send to simulators, but don't set it yet.
|
||||
|
|
|
|||
Loading…
Reference in New Issue