Skip to content

Commit fd8056e

Browse files
authored
Merge pull request WolvenKit#2687 from WolvenKit/fix/questphase-null-connections
fix: handle null graph connection references
2 parents b7c3084 + 3e96ed1 commit fd8056e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WolvenKit.App/ViewModels/Tools/ChunkViewModelExtended/ChunkViewModel.Value.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,12 +658,12 @@ when materialRef.DepotPath.GetResolvedText() is string text:
658658
break;
659659
case graphGraphConnectionDefinition conn:
660660
List<string> nameParts = [];
661-
if (conn.Source.GetValue() is graphGraphSocketDefinition source)
661+
if (conn.Source?.GetValue() is graphGraphSocketDefinition source)
662662
{
663663
nameParts.Add($"[{source.Connections.Count}] {source.Name.GetResolvedText()}");
664664
}
665665

666-
if (conn.Destination.GetValue() is graphGraphSocketDefinition dest)
666+
if (conn.Destination?.GetValue() is graphGraphSocketDefinition dest)
667667
{
668668
nameParts.Add($"[{dest.Connections.Count}] {dest.Name.GetResolvedText()}");
669669
}

0 commit comments

Comments
 (0)