mirror of https://github.com/mgba-emu/mgba.git
Core: Fix null pointer deref if no file is found
This commit is contained in:
parent
805ef9efdd
commit
3a9c99370e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue