Core: Fix null pointer deref if no file is found

This commit is contained in:
Jeffrey Pfau 2016-09-17 12:41:54 -07:00
parent 805ef9efdd
commit 3a9c99370e
1 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,9 @@ void mLibraryAddEntry(struct mLibrary* library, const char* filename, struct VFi
if (!vf) {
vf = VFileOpen(filename, O_RDONLY);
}
if (!vf) {
return;
}
core = mCoreFindVF(vf);
if (core) {
core->init(core);