mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 17:26:02 +08:00
Merge pull request #196 from DeepWolf413/master
Added a null check for NodeEditorWindow.current.
This commit is contained in:
commit
a4ce09c212
@ -81,6 +81,8 @@ namespace XNodeEditor {
|
||||
|
||||
/// <summary> Get settings of current active editor </summary>
|
||||
public static Settings GetSettings() {
|
||||
if (XNodeEditor.NodeEditorWindow.current == null) return new Settings();
|
||||
|
||||
if (lastEditor != XNodeEditor.NodeEditorWindow.current.graphEditor) {
|
||||
object[] attribs = XNodeEditor.NodeEditorWindow.current.graphEditor.GetType().GetCustomAttributes(typeof(XNodeEditor.NodeGraphEditor.CustomNodeGraphEditorAttribute), true);
|
||||
if (attribs.Length == 1) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user