add filehandle null check

This commit is contained in:
Valient Gough 2016-09-18 13:03:37 -07:00
parent 3497828816
commit 9d998ca668
No known key found for this signature in database
GPG Key ID: B515DCEB95967051

View File

@ -136,7 +136,7 @@ static int withFileNode(const char *opName, const char *path,
return op(fnode);
};
if (fi != nullptr)
if (fi != nullptr && fi->fh != 0)
res = do_op(reinterpret_cast<FileNode *>(fi->fh));
else
res = do_op(FSRoot->lookupNode(path, opName).get());