summaryrefslogtreecommitdiff
path: root/indra/newview/gltf/accessor.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2024-05-30 13:42:27 -0500
committerRunitaiLinden <davep@lindenlab.com>2024-05-30 13:42:27 -0500
commite279aae51a0f43cba0e284da4c0ea7c168316ca1 (patch)
tree27ec179553565e3f452c9dc45b49c4ad7fa91fe3 /indra/newview/gltf/accessor.cpp
parent15fd13f83036ff781160957a21bb2d59771044bc (diff)
#1597 Fix for some GLTF transforms not loading properly.
Also incidental fix for unreachable code error.
Diffstat (limited to 'indra/newview/gltf/accessor.cpp')
-rw-r--r--indra/newview/gltf/accessor.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/gltf/accessor.cpp b/indra/newview/gltf/accessor.cpp
index 5f4e3ca3a8..9f1cb0c1cd 100644
--- a/indra/newview/gltf/accessor.cpp
+++ b/indra/newview/gltf/accessor.cpp
@@ -124,8 +124,10 @@ void Buffer::erase(Asset& asset, S32 offset, S32 length)
bool Buffer::prep(Asset& asset)
{
- // PRECONDITION: mByteLength must not be 0
- llassert(mByteLength != 0);
+ if (mByteLength == 0)
+ {
+ return false;
+ }
LLUUID id;
if (mUri.size() == UUID_STR_SIZE && LLUUID::parseUUID(mUri, &id) && id.notNull())