diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-15 17:56:30 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-15 17:56:30 +0300 |
commit | 8d77d51e636f5384b0b024350a0a219e041b5446 (patch) | |
tree | 5411da7404f93816452addc81f9a9715edd2ad1b /indra/newview/llcontrolavatar.cpp | |
parent | f486bdbb48dda1364d71b8d80cc3c837efb96284 (diff) |
SL-10908 Safeguards and potential crash fix
Diffstat (limited to 'indra/newview/llcontrolavatar.cpp')
-rw-r--r-- | indra/newview/llcontrolavatar.cpp | 9 |
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; } |