mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 17:56:06 +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>
|
/// <summary> Get settings of current active editor </summary>
|
||||||
public static Settings GetSettings() {
|
public static Settings GetSettings() {
|
||||||
|
if (XNodeEditor.NodeEditorWindow.current == null) return new Settings();
|
||||||
|
|
||||||
if (lastEditor != XNodeEditor.NodeEditorWindow.current.graphEditor) {
|
if (lastEditor != XNodeEditor.NodeEditorWindow.current.graphEditor) {
|
||||||
object[] attribs = XNodeEditor.NodeEditorWindow.current.graphEditor.GetType().GetCustomAttributes(typeof(XNodeEditor.NodeGraphEditor.CustomNodeGraphEditorAttribute), true);
|
object[] attribs = XNodeEditor.NodeEditorWindow.current.graphEditor.GetType().GetCustomAttributes(typeof(XNodeEditor.NodeGraphEditor.CustomNodeGraphEditorAttribute), true);
|
||||||
if (attribs.Length == 1) {
|
if (attribs.Length == 1) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user