mirror of
https://github.com/Siccity/xNode.git
synced 2026-02-04 22:34:54 +08:00
Added null check
This commit is contained in:
parent
c6a4735c71
commit
9784bebd88
@ -73,7 +73,7 @@ namespace XNodeEditor {
|
|||||||
hoveredPort.Disconnect(output);
|
hoveredPort.Disconnect(output);
|
||||||
draggedOutput = output;
|
draggedOutput = output;
|
||||||
draggedOutputTarget = hoveredPort;
|
draggedOutputTarget = hoveredPort;
|
||||||
NodeEditor.onUpdateNode(node);
|
if (NodeEditor.onUpdateNode != null) NodeEditor.onUpdateNode(node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (IsHoveringNode && IsHoveringTitle(hoveredNode)) {
|
} else if (IsHoveringNode && IsHoveringTitle(hoveredNode)) {
|
||||||
@ -89,7 +89,7 @@ namespace XNodeEditor {
|
|||||||
if (draggedOutputTarget != null) {
|
if (draggedOutputTarget != null) {
|
||||||
Node node = draggedOutputTarget.node;
|
Node node = draggedOutputTarget.node;
|
||||||
if (graph.nodes.Count != 0) draggedOutput.Connect(draggedOutputTarget);
|
if (graph.nodes.Count != 0) draggedOutput.Connect(draggedOutputTarget);
|
||||||
NodeEditor.onUpdateNode(node);
|
if (NodeEditor.onUpdateNode != null) NodeEditor.onUpdateNode(node);
|
||||||
EditorUtility.SetDirty(graph);
|
EditorUtility.SetDirty(graph);
|
||||||
}
|
}
|
||||||
//Release dragged connection
|
//Release dragged connection
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user