summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index fa8db1fae1..f3157334f7 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -4315,9 +4315,12 @@ BOOL LLSelectMgr::selectGetAggregateTexturePermissions(LLAggregatePermissions& r
BOOL LLSelectMgr::isMovableAvatarSelected()
{
- if (mAllowSelectAvatar)
+ if (mAllowSelectAvatar && getSelection()->getObjectCount() == 1)
{
- return (getSelection()->getObjectCount() == 1) && (getSelection()->getFirstRootObject()->isAvatar()) && getSelection()->getFirstMoveableNode(TRUE);
+ // nothing but avatar should be selected, so check that
+ // there is only one selected object and it is a root
+ LLViewerObject* obj = getSelection()->getFirstRootObject();
+ return obj && obj->isAvatar() && getSelection()->getFirstMoveableNode(TRUE);
}
return FALSE;
}