diff options
-rw-r--r-- | editor/shader_globals_editor.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editor/shader_globals_editor.cpp b/editor/shader_globals_editor.cpp index aa88b0ef39..04fbac3463 100644 --- a/editor/shader_globals_editor.cpp +++ b/editor/shader_globals_editor.cpp @@ -437,6 +437,9 @@ void ShaderGlobalsEditor::_notification(int p_what) { inspector->edit(interface); } } + if (p_what == NOTIFICATION_PREDELETE) { + inspector->edit(nullptr); + } } ShaderGlobalsEditor::ShaderGlobalsEditor() { @@ -474,6 +477,5 @@ ShaderGlobalsEditor::ShaderGlobalsEditor() { } ShaderGlobalsEditor::~ShaderGlobalsEditor() { - inspector->edit(nullptr); memdelete(interface); } |