1
0
mirror of https://github.com/Siccity/xNode.git synced 2025-12-20 09:16:01 +08:00

Merge pull request #240 from jeffcampbellmakesgames/fix/validate_nre

Added NRE check for ValidateGraphEditor
This commit is contained in:
Thor Brigsted 2020-03-08 12:49:09 +01:00 committed by GitHub
commit 9a6746a898
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ namespace XNodeEditor {
/// <summary> Make sure the graph editor is assigned and to the right object </summary>
private void ValidateGraphEditor() {
NodeGraphEditor graphEditor = NodeGraphEditor.GetEditor(graph, this);
if (this.graphEditor != graphEditor) {
if (this.graphEditor != graphEditor && graphEditor != null) {
this.graphEditor = graphEditor;
graphEditor.OnOpen();
}