Fix crash in SceneAnimationPlayer
This commit is contained in:
@@ -905,7 +905,7 @@ void SceneAnimationPlayer::Tick(SceneAnimation* anim, float time, float dt, int3
|
|||||||
MException ex(exception);
|
MException ex(exception);
|
||||||
ex.Log(LogType::Error, TEXT("Property"));
|
ex.Log(LogType::Error, TEXT("Property"));
|
||||||
}
|
}
|
||||||
else if (!MCore::Type::IsPointer(valueType))
|
else if (!MCore::Type::IsPointer(valueType) && !MCore::Type::IsReference(valueType))
|
||||||
{
|
{
|
||||||
if (boxed)
|
if (boxed)
|
||||||
Platform::MemoryCopy(value, MCore::Object::Unbox(boxed), valueSize);
|
Platform::MemoryCopy(value, MCore::Object::Unbox(boxed), valueSize);
|
||||||
|
|||||||
@@ -1230,7 +1230,7 @@ namespace FlaxEngine.Interop
|
|||||||
internal static bool GetTypeIsReference(ManagedHandle typeHandle)
|
internal static bool GetTypeIsReference(ManagedHandle typeHandle)
|
||||||
{
|
{
|
||||||
Type type = Unsafe.As<TypeHolder>(typeHandle.Target);
|
Type type = Unsafe.As<TypeHolder>(typeHandle.Target);
|
||||||
return type.IsByRef;
|
return !type.IsValueType; // Maybe also type.IsByRef?
|
||||||
}
|
}
|
||||||
|
|
||||||
[UnmanagedCallersOnly]
|
[UnmanagedCallersOnly]
|
||||||
|
|||||||
Reference in New Issue
Block a user