Skip to content

Commit fb1e2a9

Browse files
committed
Crash at LLVOVolume::isAnimatedObject
1 parent d61d696 commit fb1e2a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

indra/newview/llvovolume.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3783,7 +3783,12 @@ bool LLVOVolume::canBeAnimatedObject() const
37833783

37843784
bool LLVOVolume::isAnimatedObject() const
37853785
{
3786-
LLVOVolume *root_vol = (LLVOVolume*)getRootEdit();
3786+
LLViewerObject *root_obj = getRootEdit();
3787+
if (root_obj->getPCode() != LL_PCODE_VOLUME)
3788+
{
3789+
return false; // at the moment only volumes can be animated
3790+
}
3791+
LLVOVolume* root_vol = (LLVOVolume*)root_obj;
37873792
mIsAnimatedObject = root_vol->getExtendedMeshFlags() & LLExtendedMeshParams::ANIMATED_MESH_ENABLED_FLAG;
37883793
return mIsAnimatedObject;
37893794
}

0 commit comments

Comments
 (0)