mirror of https://github.com/mgba-emu/mgba.git
Fix _readTag to not crash if the VFile has been closed
This commit is contained in:
parent
fade994137
commit
e3410fc457
|
@ -208,6 +208,10 @@ uint16_t GBARRQueryInput(struct GBARRContext* rr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
enum GBARRTag _readTag(struct GBARRContext* rr, struct VFile* vf) {
|
enum GBARRTag _readTag(struct GBARRContext* rr, struct VFile* vf) {
|
||||||
|
if (!rr || !vf) {
|
||||||
|
return TAG_EOF;
|
||||||
|
}
|
||||||
|
|
||||||
enum GBARRTag tag = rr->peekedTag;
|
enum GBARRTag tag = rr->peekedTag;
|
||||||
switch (tag) {
|
switch (tag) {
|
||||||
case TAG_INPUT:
|
case TAG_INPUT:
|
||||||
|
|
Loading…
Reference in New Issue