summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-05-21 22:06:51 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-05-22 07:11:54 +0300
commit6a92f8777de3e5031509af7dca44d334881faf47 (patch)
treee7b86107b7bd220b9da0cbcb90adb7ea20672e4a
parentfe84905b1762c821fbc0ef1db97b8df885e6cce1 (diff)
Crash at LLVOVolume::isAnimatedObject
-rw-r--r--indra/newview/llvovolume.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 63ff6bc79d..fb6aa7a326 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3783,7 +3783,12 @@ bool LLVOVolume::canBeAnimatedObject() const
bool LLVOVolume::isAnimatedObject() const
{
- LLVOVolume *root_vol = (LLVOVolume*)getRootEdit();
+ LLViewerObject *root_obj = getRootEdit();
+ if (root_obj->getPCode() != LL_PCODE_VOLUME)
+ {
+ return false; // at the moment only volumes can be animated
+ }
+ LLVOVolume* root_vol = (LLVOVolume*)root_obj;
mIsAnimatedObject = root_vol->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
return mIsAnimatedObject;
}