summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawable.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <118752495+marchcat@users.noreply.github.com>2025-12-03 22:28:01 +0200
committerGitHub <noreply@github.com>2025-12-03 22:28:01 +0200
commit189ffd46e0316e333bc850f69eb7ed57dd7829e7 (patch)
tree68fd14fac829ae5223919fa21d0ab580ad64af7b /indra/newview/lldrawable.cpp
parentb49400e0882a80dd2972a31cde2152ba979b2ce4 (diff)
parent1e1f96e8e406d9b56e7b9246b9999e92434656af (diff)
Merge pull request #5101 from secondlife/marchcat/devlinux-2601
Merge 26.01 into develop-linux
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r--indra/newview/lldrawable.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 9d212cfe8b..322ee90541 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();
+ }
}
}
@@ -948,6 +954,11 @@ void LLDrawable::updateTexture()
return;
}
+ if (!mVObjp)
+ {
+ return;
+ }
+
if (getNumFaces() != mVObjp->getNumTEs())
{ //drawable is transitioning its face count
return;