### Godot version

4.1 rc3

### System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 30.0.15.1403) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

### Issue description

This™
![image](https://github.com/godotengine/godot/assets/2223172/cb33110f-a5b0-400a-951f-3fa425f05714)

It can still happen, but it's more difficult to trigger.

### Steps to reproduce

1. Create a new scene with a Control node
2. Add Theme to the Control
3. Open Theme Editor
4. Clear the `theme` property in Control
5. Save, with Theme Editor opened
6. Restart

### Minimal reproduction project

N/A
}
		} else {
			
			
			
			Ref<EditorFeatureProfile> profile = feature_profile_manager->get_current_profile();
			if (!profile.is_valid() || !profile->is_feature_disabled(EditorFeatureProfile::FEATURE_3D)) {
				img = Node3DEditor::get_singleton()->get_editor_viewport(0)->get_viewport_node()->get_texture()->get_image();
			}
		}
		if (img.is_valid() && img->get_width() > 0 && img->get_height() > 0) {
			img = img->duplicate();
			save.step(TTR("Creating Thumbnail"), 2);
			save.step(TTR("Creating Thumbnail"), 3);
			int preview_size = EDITOR_GET("filesystem/file_dialog/thumbnail_size");
			preview_size *= EDSCALE;
			
			int vp_size = MIN(img->get_width(), img->get_height());
			int x = (img->get_width() - vp_size) / 2;
			int y = (img->get_height() - vp_size) / 2;
			if (vp_size < preview_size) {
				
				img->crop_from_point(x, y, vp_size, vp_size);
			} else {
				int ratio = vp_size / preview_size;
				int size = preview_size * MAX(1, ratio / 2);
				x = (img->get_width() - size) / 2;
				y = (img->get_height() - size) / 2;
				img->crop_from_point(x, y, size, size);
				img->resize(preview_size, preview_size, Image::INTERPOLATE_LANCZOS);