### 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
fading_pos = playback->get_fading_pos();
			}
			{
				if (last_travel_path.size() != tp.size()) {
					same_travel_path = false;
				} else {
					for (int i = 0; i < last_travel_path.size(); i++) {
						if (last_travel_path[i] != tp[i]) {
							same_travel_path = false;
							break;
						}
					}
				}
			}
			
			if (!same_travel_path ||
					last_active != is_playing ||
					last_current_node != current_node ||
					last_fading_from_node != fading_from_node ||
					last_fading_time != fading_time ||
					last_fading_pos != fading_pos) {
				state_machine_draw->queue_redraw();
				last_travel_path = tp;
				last_current_node = current_node;
				last_active = is_playing;
				last_fading_from_node = fading_from_node;
				last_fading_time = fading_time;
				last_fading_pos = fading_pos;
				state_machine_play_pos->queue_redraw();
			}