Repository: godotengine/godot (language: cpp)

Issue:
Plugin icon not displayed
### Tested versions

- Reproducible in: v4.4.beta4.official [93d270693] and v4.4.beta3.official [06acfccf8]

### System information

Windows 11 - Vulkan 1.3.280 - Forward+ - Using Device #0: NVIDIA - NVIDIA GeForce RTX 3070

### Issue description

The plugin icon is not displayed in Godot 4.4 beta 3 and beta 4 as shown in the images below:

![Image](https://github.com/user-attachments/assets/c5637e21-c4cc-403f-8924-238c6d8fdf71)
![Image](https://github.com/user-attachments/assets/3eab77b8-888b-4f40-a02e-45e79b197fd4)

### Steps to reproduce

Create a new project. Create a main scene. Go to assetLib and download a plugin (I downloaded the Audio Manager 3D plugin). Activate the plugin and add it to the scene. You will see that the icon does not display both when choosing in the node tree and in the main scene.

### Minimal reproduction project (MRP)

[plugin_icon.zip](https://github.com/user-attachments/files/18847390/plugin_icon.zip)


Discussion / hints:
Regression from https://github.com/godotengine/godot/pull/101489 cc @RandomShaper 
This can't be from #101489 as it doesn't occur in `beta3`, which is after that was merged (it was merged on February 4th and beta3 is from february 7th)
> This can't be from [#101489](https://github.com/godotengine/godot/pull/101489) as it doesn't occur in `beta3`, which is after that was merged (it was merged on February 4th and beta3 is from february 7th)

Yeah I just realized that now by checking the merge date, but since doing a checkout one commit before it was working and on that commit not working, it made me say that.
If you're able to bisect this it would be very helpful since you can confirm this
So for me it does *not* work on beta3 (06acfccf8), but it does work in beta2. I double checked and did a full bisection and it's indeed a regression from https://github.com/godotengine/godot/pull/101489

Can you retest @Saulo-de-Souza to see if it is indeed working for you in beta3 ? Maybe there was some cache keeping the icon or something like that ?
I did a new test, but now creating a new project in beta 3 and as you said, it really should be cache or something like that, because now it didn't work in beta 3 either. What do I do? Do I need to change what I published here? Or are you already aware?
You should update your issue report with the new information




> You should update your issue report with the new information

Done! Thank you!

Fix patch:
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index d06472e3ce17..7b6eb4093bbf 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -1028,8 +1028,8 @@ String EditorData::script_class_get_icon_path(const String &p_class, bool *r_val
 			return String();
 		}
 		HashMap<StringName, String>::ConstIterator E = _script_class_icon_paths.find(current);
-		if ((bool)E && !E->value.is_empty()) {
-			if (r_valid) {
+		if ((bool)E) {
+			if (r_valid && !E->value.is_empty()) {
 				*r_valid = true;
 			}
 			return E->value;


Test patch: