summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHecklezz <tj8@live.com.au>2025-11-13 01:30:41 +1000
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-11-12 23:13:32 +0200
commitc39b35eaf15e384c3c0492bebd03b1a0130649a1 (patch)
treecb3b27b425429d69118a8746ab88c950c8b00cd9
parentba133e41da0694ead01bc5536557c87640187cf5 (diff)
Fix crash in updateDistance updating LOD on null mVObjp
Signed-off-by: Hecklezz <tj8@live.com.au>
-rw-r--r--indra/newview/lldrawable.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 9d212cfe8b..6f8fb34fb3 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -925,7 +925,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
LLVector3 cam_pos_from_agent = LLViewerCamera::getInstance()->getOrigin();
LLVector3 cam_to_box_offset = point_to_box_offset(cam_pos_from_agent, av_box);
mDistanceWRTCamera = llmax(0.01f, ll_round(cam_to_box_offset.magVec(), 0.01f));
- mVObjp->updateLOD();
+ if (mVObjp)
+ {
+ mVObjp->updateLOD();
+ }
return;
}
}
@@ -936,7 +939,10 @@ void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
pos -= camera.getOrigin();
mDistanceWRTCamera = ll_round(pos.magVec(), 0.01f);
- mVObjp->updateLOD();
+ if (mVObjp)
+ {
+ mVObjp->updateLOD();
+ }
}
}