You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Merge pull request #83487 from KoBeWi/crash_that_does_not_exist
Prevent crash when creating custom file tooltip
This commit is contained in:
@@ -2493,6 +2493,7 @@ Control *FileSystemDock::create_tooltip_for_path(const String &p_path) const {
|
|||||||
// No tooltip for directory.
|
// No tooltip for directory.
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
ERR_FAIL_COND_V(!FileAccess::exists(p_path), nullptr);
|
||||||
|
|
||||||
const String type = ResourceLoader::get_resource_type(p_path);
|
const String type = ResourceLoader::get_resource_type(p_path);
|
||||||
Control *tooltip = EditorResourceTooltipPlugin::make_default_tooltip(p_path);
|
Control *tooltip = EditorResourceTooltipPlugin::make_default_tooltip(p_path);
|
||||||
|
|||||||
Reference in New Issue
Block a user