Merge pull request #42748 from qarmin/dont_clear_twice

Don't try to compare freed object to nullptr
This commit is contained in:
Rémi Verschelde 2020-10-13 10:50:19 +02:00 committed by GitHub
commit 2965d519cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}