summaryrefslogtreecommitdiff
path: root/indra/newview/llcontrolavatar.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-07-15 17:56:30 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2019-07-15 17:56:30 +0300
commite9a9f71e563f236eabf5dca980913bcbb6f36a94 (patch)
tree183b98dda03a3612b63e140e6ef9f5cf99757ce5 /indra/newview/llcontrolavatar.cpp
parent0771d66acec71a4165eed03e3b0efc24f7d760e5 (diff)
SL-10908 Safeguards and potential crash fix
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;
}