Browse Source

Merge pull request #12771 from GodotExplorer/pr-debugger-fix-2.1

Add null check to fix crashing with debugger
Rémi Verschelde 7 years ago
parent
commit
6851d00a20
1 changed files with 1 additions and 1 deletions
  1. 1 1
      editor/editor_data.cpp

+ 1 - 1
editor/editor_data.cpp

@@ -90,7 +90,7 @@ void EditorHistory::_add_object(ObjectID p_object, const String &p_property, int
 		if (obj->is_type("ScriptEditorDebuggerInspectedObject")) {
 			for (int i = current; i >= 0; i--) {
 				Object *pre_obj = ObjectDB::get_instance(get_history_obj(i));
-				if (pre_obj->is_type("ScriptEditorDebuggerInspectedObject")) {
+				if (pre_obj != NULL && pre_obj->is_type("ScriptEditorDebuggerInspectedObject")) {
 					if (pre_obj->call("get_remote_object_id") == obj->call("get_remote_object_id")) {
 						History &pr = history[i];
 						pr.path[pr.path.size() - 1] = o;