1
0
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:
Thor Brigsted 2019-10-23 12:08:14 +02:00 committed by GitHub
commit a4ce09c212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {