浏览代码

Fixed null crash

flabbet 7 月之前
父节点
当前提交
697230397b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/PixiEditor/Views/Nodes/NodeGraphView.cs

+ 5 - 0
src/PixiEditor/Views/Nodes/NodeGraphView.cs

@@ -582,6 +582,11 @@ internal class NodeGraphView : Zoombox.Zoombox
 
     private void UpdateConnections(NodeView nodeView)
     {
+        if(nodeView == null)
+        {
+            return;
+        }
+        
         foreach (NodePropertyView propertyView in nodeView.GetVisualDescendants().OfType<NodePropertyView>())
         {
             NodePropertyViewModel property = (NodePropertyViewModel)propertyView.DataContext;