File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,6 @@ LLVOAvatar *LLControlAvatar::getAttachedAvatar()
99
99
100
100
void LLControlAvatar::getNewConstraintFixups (LLVector3& new_pos_fixup, F32& new_scale_fixup) const
101
101
{
102
-
103
102
F32 max_legal_offset = MAX_LEGAL_OFFSET;
104
103
if (gSavedSettings .getControl (" AnimatedObjectsMaxLegalOffset" ))
105
104
{
@@ -362,6 +361,9 @@ LLControlAvatar *LLControlAvatar::createControlAvatar(LLVOVolume *obj)
362
361
void LLControlAvatar::markForDeath ()
363
362
{
364
363
mMarkedForDeath = true ;
364
+ // object unlinked cav and might be dead already
365
+ // might need to clean mControlAVBridge here as well
366
+ mRootVolp = NULL ;
365
367
}
366
368
367
369
void LLControlAvatar::idleUpdate (LLAgent &agent, const F64 &time)
@@ -440,7 +442,7 @@ void LLControlAvatar::updateDebugText()
440
442
F32 streaming_cost = 0 .f ;
441
443
std::string cam_dist_string = " " ;
442
444
S32 cam_dist_count = 0 ;
443
- F32 lod_radius = mRootVolp ->mLODRadius ;
445
+ F32 lod_radius = mRootVolp ? mRootVolp ->mLODRadius : 0 . f ;
444
446
445
447
for (std::vector<LLVOVolume*>::iterator it = volumes.begin ();
446
448
it != volumes.end (); ++it)
Original file line number Diff line number Diff line change @@ -392,6 +392,12 @@ LLViewerObject::~LLViewerObject()
392
392
sNumZombieObjects --;
393
393
llassert (mChildList .size () == 0 );
394
394
llassert (mControlAvatar .isNull ()); // Should have been cleaned by now
395
+ if (mControlAvatar .notNull ())
396
+ {
397
+ mControlAvatar ->markForDeath ();
398
+ mControlAvatar = NULL ;
399
+ LL_WARNS () << " Dead object owned a live control avatar" << LL_ENDL;
400
+ }
395
401
396
402
clearInventoryListeners ();
397
403
}
You can’t perform that action at this time.
0 commit comments