all repos — mgba @ e3410fc457b57b6d3145ca5a4ab190adcd517c57

mGBA Game Boy Advance Emulator

Fix _readTag to not crash if the VFile has been closed
Jeffrey Pfau jeffrey@endrift.com
Tue, 29 Jul 2014 23:15:08 -0700
commit

e3410fc457b57b6d3145ca5a4ab190adcd517c57

parent

fade9941370ae801487c8ab39822f41fdd6a6f75

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-rr.csrc/gba/gba-rr.c

@@ -208,6 +208,10 @@ return rr->currentInput;

} enum GBARRTag _readTag(struct GBARRContext* rr, struct VFile* vf) { + if (!rr || !vf) { + return TAG_EOF; + } + enum GBARRTag tag = rr->peekedTag; switch (tag) { case TAG_INPUT: