### Godot version

41e5f5b0930343ef548a56d553ba20fafd672147

### System information

Windows 10, Vulkan, Intel® Core™ i7-8700K, Nvidia GTX 1080 (471.11)

### Issue description

The editor will crash if you select an AnimationTree node then select another node. This seems to be caused by the edit function assigning a null object via the edit interface, then calling another function which does not appear to be null.

### Steps to reproduce

Create an AnimationTree node then select another node.

### Minimal reproduction project

N/A
}
		tl.selected = selected_transition_from == tl.from_node && selected_transition_to == tl.to_node;
		if (blend_from == local_from && current == local_to) {
			tl.travel = true;
			tl.fade_ratio = MIN(1.0, fading_pos / fading_time);
		}
		if (travel_path.size()) {
			if (current == local_from && travel_path[0] == local_to) {
				tl.travel = true;
			} else {
				for (int j = 0; j < travel_path.size() - 1; j++) {
					if (travel_path[j] == local_from && travel_path[j + 1] == local_to) {
						tl.travel = true;
						break;
					}
				}
			}
		}
		StringName fullpath = AnimationTreeEditor::get_singleton()->get_base_path() + String(tl.advance_condition_name);
		if (tl.advance_condition_name != StringName() && bool(tree->get(fullpath))) {
			tl.advance_condition_state = true;
			tl.auto_advance = true;
		}
		
		for (int j = 0; j < transition_lines.size(); j++) {
			StringName from = String(transition_lines[j].from_node).get_slicec('/', 0);
			StringName to = String(transition_lines[j].to_node).get_slicec('/', 0);
			from = from == ".." ? state_machine->start_node : from;
			to = to == ".." ? state_machine->end_node : to;
			if (from == local_from && to == local_to) {