mirror of https://github.com/mgba-emu/mgba.git
Check if VFileOpen is actually passed a path before trying to open it
This commit is contained in:
parent
ba5c77523d
commit
d44bf73a81
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue