summaryrefslogtreecommitdiff
path: root/indra/newview/llcontrolavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llcontrolavatar.cpp')
-rw-r--r--indra/newview/llcontrolavatar.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index d24dac385f..92eeebd705 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -327,10 +327,13 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
{
LLControlAvatar *cav = (LLControlAvatar*)gObjectList.createObjectViewer(LL_PCODE_LEGACY_AVATAR, gAgent.getRegion(), CO_FLAG_CONTROL_AVATAR);
- cav->mRootVolp = obj;
+ if (cav)
+ {
+ cav->mRootVolp = obj;
- // Sync up position/rotation with object
- cav->matchVolumeTransform();
+ // Sync up position/rotation with object
+ cav->matchVolumeTransform();
+ }
return cav;
}