### 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
for (int i = 0; i < editors.size(); i++) {
		if (editors[i]->can_edit(p_node)) {
			return true;
		}
	}
	return false;
}
Vector<String> AnimationTreeEditor::get_animation_list() {
	if (!singleton->is_visible()) {
		return Vector<String>();
	}
	AnimationTree *tree = singleton->tree;
	if (!tree || !tree->has_node(tree->get_animation_player())) {
		return Vector<String>();
	}
	AnimationPlayer *ap = Object::cast_to<AnimationPlayer>(tree->get_node(tree->get_animation_player()));
	if (!ap) {
		return Vector<String>();
	}
	List<StringName> anims;
	ap->get_animation_list(&anims);
	Vector<String> ret;
	for (const StringName &E : anims) {
		ret.push_back(E);
	}
	return ret;
}
AnimationTreeEditor::AnimationTreeEditor() {