### Godot version

4.1 beta2

### System information

Windows 10 Home

### Issue description

I had a control with a custom theme which i removed. When loading the project again the Theme Editor is opened and some actions, like Show Default or Override All, cause the editor to crash.

### Steps to reproduce

1. create a scene with a Control node
2. add a custom theme to it
3. click the theme so the Theme Editor opens
4. remove the theme
5. save the scene
6. close the project and open it again (Theme Editor needs to be opened when closing the project)
7. click Show Default or Override All

### Minimal reproduction project

[Godot41_themeEditorCrash.zip](https://github.com/godotengine/godot/files/11760454/Godot41_themeEditorCrash.zip)

void _show_messages();
	void _vp_resized();
	void _titlebar_resized();
	void _version_button_pressed();
	void _update_undo_redo_allowed();
	int _save_external_resources();
	bool _validate_scene_recursive(const String &p_filename, Node *p_node);
	void _save_scene(String p_file, int idx = -1);
	void _save_all_scenes();
	int _next_unsaved_scene(bool p_valid_filename, int p_start = 0);
	void _discard_changes(const String &p_str = String());
	void _inherit_request(String p_file);
	void _instantiate_request(const Vector<String> &p_files);
	void _quick_opened();
	void _open_command_palette();
	void _project_run_started();
	void _project_run_stopped();
	void _add_to_recent_scenes(const String &p_scene);
	void _update_recent_scenes();
	void _open_recent_scene(int p_idx);
	void _global_menu_scene(const Variant &p_tag);
	void _global_menu_new_window(const Variant &p_tag);
	void _dropped_files(const Vector<String> &p_files);
	void _add_dropped_files_recursive(const Vector<String> &p_files, String to_path);
	void _update_from_settings();
	void _renderer_selected(int);
	void _update_renderer_color();
	void _exit_editor(int p_exit_code);
	virtual void shortcut_input(const Ref<InputEvent> &p_event) override;
	bool has_main_screen() const { return true; }