summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-10-26 15:59:19 +0200
committerRémi Verschelde <rverschelde@gmail.com>2023-10-26 15:59:19 +0200
commit34b1c0e40ba3ec92cb8512dbf81f11a969ff2a83 (patch)
treed6df0f332226de77d75969a3f94b367072ff4ba7
parent253711ec98d0eddb78953f38dc78ac41385aa1be (diff)
parentef4c214703f5c3f9446b1182161d0ad423a3a05f (diff)
downloadredot-engine-34b1c0e40ba3ec92cb8512dbf81f11a969ff2a83.tar.gz
Merge pull request #83487 from KoBeWi/crash_that_does_not_exist
Prevent crash when creating custom file tooltip
-rw-r--r--editor/filesystem_dock.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index afefd38b20..8f101d645f 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -2493,6 +2493,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);