summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal54@gmail.com>2020-10-13 10:27:49 +0200
committerRafał Mikrut <mikrutrafal54@gmail.com>2020-10-13 10:27:49 +0200
commit2ad5b7100b0642517197d8059a92029e58444d56 (patch)
tree4e41a77509991d2a23b24e0cf0775645d7c8a0e4
parent3f7f4fb6f3140528e6c7589842dfbc5a5d419f0b (diff)
Don't try to compare freed object to nullptr
-rw-r--r--editor/shader_globals_editor.cpp4
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);
}