From ef4c214703f5c3f9446b1182161d0ad423a3a05f Mon Sep 17 00:00:00 2001 From: kobewi Date: Tue, 17 Oct 2023 11:37:52 +0200 Subject: [PATCH] Prevent crash when creating custom file tooltip --- editor/filesystem_dock.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 655f8ee95c7..603bab146cd 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -2503,6 +2503,7 @@ Control *FileSystemDock::create_tooltip_for_path(const String &p_path) const { // No tooltip for directory. return nullptr; } + ERR_FAIL_COND_V(!FileAccess::exists(p_path), nullptr); const String type = ResourceLoader::get_resource_type(p_path); Control *tooltip = EditorResourceTooltipPlugin::make_default_tooltip(p_path);