diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index a491a9b214f..afefd38b207 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1554,7 +1554,9 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin void FileSystemDock::_update_resource_paths_after_move(const HashMap &p_renames, const HashMap &p_uids) const { // Update the paths in ResourceUID, so that UIDs remain valid. for (const KeyValue &pair : p_uids) { - ResourceUID::get_singleton()->set_id(pair.value, p_renames[pair.key]); + if (p_renames.has(pair.key)) { + ResourceUID::get_singleton()->set_id(pair.value, p_renames[pair.key]); + } } // Rename all resources loaded, be it subresources or actual resources.