diff --git a/src/util/vfs.c b/src/util/vfs.c index ccd52877c..137d68095 100644 --- a/src/util/vfs.c +++ b/src/util/vfs.c @@ -39,6 +39,9 @@ static struct VFile* _vdOpenFile(struct VDir* vd, const char* path, int mode); static const char* _vdeName(struct VDirEntry* vde); struct VFile* VFileOpen(const char* path, int flags) { + if (!path) { + return 0; + } int fd = open(path, flags, 0666); return VFileFromFD(fd); }