Fix _readTag to not crash if the VFile has been closed
Jeffrey Pfau jeffrey@endrift.com
Tue, 29 Jul 2014 23:15:08 -0700
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba-rr.c
→
src/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: