CFile: fix null pointer dereference

as title