diff --git a/sources/editor/Stride.Assets.Presentation/ValueConverters/EntityComponentToTransformLinkInfo.cs b/sources/editor/Stride.Assets.Presentation/ValueConverters/EntityComponentToTransformLinkInfo.cs index ad27aeeb3e..f43652cd99 100644 --- a/sources/editor/Stride.Assets.Presentation/ValueConverters/EntityComponentToTransformLinkInfo.cs +++ b/sources/editor/Stride.Assets.Presentation/ValueConverters/EntityComponentToTransformLinkInfo.cs @@ -19,7 +19,7 @@ public override object Convert(object value, Type targetType, object parameter, if (string.IsNullOrEmpty(modelNodeLinkComponent?.NodeName)) return DependencyProperty.UnsetValue; - if (modelNodeLinkComponent.Target != null && !string.IsNullOrEmpty(modelNodeLinkComponent.NodeName)) + if (modelNodeLinkComponent.Target?.Entity != null && !string.IsNullOrEmpty(modelNodeLinkComponent.NodeName)) { var entity = modelNodeLinkComponent.Target.Entity; return $"{entity.Name}.{modelNodeLinkComponent.NodeName}"; diff --git a/sources/engine/Stride.Engine/Engine/ModelComponent.cs b/sources/engine/Stride.Engine/Engine/ModelComponent.cs index de85a667ec..63231b8c76 100644 --- a/sources/engine/Stride.Engine/Engine/ModelComponent.cs +++ b/sources/engine/Stride.Engine/Engine/ModelComponent.cs @@ -124,6 +124,9 @@ public SkeletonUpdater Skeleton private void CheckSkeleton() { + if (model is null) + return; + if (modelViewHierarchyDirty || meshInfos.Count != model.Meshes.Count) { ModelUpdated();