mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-21 01:36:03 +08:00
Fixed error on graph open
Error introduced in commit 2582d5aaf3cac7c769ee21cde7de449bee353e6f Caused by trying to get settings in OnFocus, before the graph is ready
This commit is contained in:
parent
7a1726b342
commit
8f658d2762
@ -22,7 +22,7 @@ namespace XNodeEditor {
|
|||||||
void OnFocus() {
|
void OnFocus() {
|
||||||
current = this;
|
current = this;
|
||||||
graphEditor = NodeGraphEditor.GetEditor(graph);
|
graphEditor = NodeGraphEditor.GetEditor(graph);
|
||||||
if (NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
if (graphEditor != null && NodeEditorPreferences.GetSettings().autoSave) AssetDatabase.SaveAssets();
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void OnEnable();
|
partial void OnEnable();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user