Browse Source

Merge pull request #36813 from Faless/debugger/fix_crashes

Fix some bugs spotted by asan in editor debugger.
Rémi Verschelde 5 years ago
parent
commit
da502f744e

+ 1 - 0
editor/debugger/editor_debugger_inspector.cpp

@@ -91,6 +91,7 @@ EditorDebuggerInspector::EditorDebuggerInspector() {
 }
 
 EditorDebuggerInspector::~EditorDebuggerInspector() {
+	clear_cache();
 	memdelete(variables);
 }
 

+ 1 - 3
editor/debugger/script_editor_debugger.cpp

@@ -1423,7 +1423,7 @@ void ScriptEditorDebugger::_clear_errors_list() {
 	error_tree->clear();
 	error_count = 0;
 	warning_count = 0;
-	_notification(NOTIFICATION_PROCESS);
+	update_tabs();
 }
 
 // Right click on specific file(s) or folder(s).
@@ -1834,7 +1834,5 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
 ScriptEditorDebugger::~ScriptEditorDebugger() {
 
 	ppeer->set_stream_peer(Ref<StreamPeer>());
-
-	inspector->clear_cache();
 	memdelete(scene_tree);
 }