mirror of
https://github.com/Siccity/xNode.git
synced 2026-03-26 22:49:02 +08:00
Prevented NRE on property field.
This commit is contained in:
parent
417e63ee6c
commit
38f59506af
@ -25,7 +25,7 @@ namespace XNodeEditor {
|
||||
public static void PropertyField(SerializedProperty property, GUIContent label, bool includeChildren = true, params GUILayoutOption[] options) {
|
||||
if (property == null) throw new NullReferenceException();
|
||||
XNode.Node node = property.serializedObject.targetObject as XNode.Node;
|
||||
XNode.NodePort port = node.GetPort(property.name);
|
||||
XNode.NodePort port = node != null ? node.GetPort(property.name) : null;
|
||||
PropertyField(property, label, port, includeChildren);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user