diff --git a/Kernel/FileSystem/Custody.cpp b/Kernel/FileSystem/Custody.cpp index 519c8414d4..6dbdbbec5a 100644 --- a/Kernel/FileSystem/Custody.cpp +++ b/Kernel/FileSystem/Custody.cpp @@ -55,6 +55,8 @@ Custody::~Custody() String Custody::absolute_path() const { + if (!parent()) + return "/"; Vector custody_chain; for (auto* custody = this; custody; custody = custody->parent()) custody_chain.append(custody);