Fix _readTag to not crash if the VFile has been closed

This commit is contained in:
Jeffrey Pfau 2014-07-29 23:15:08 -07:00
parent fade994137
commit e3410fc457
1 changed files with 4 additions and 0 deletions

View File

@ -208,6 +208,10 @@ uint16_t GBARRQueryInput(struct GBARRContext* rr) {
}
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: