summaryrefslogtreecommitdiff
path: root/src/fs/virtfs/virtfs1_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/virtfs/virtfs1_unittest.cc')
-rw-r--r--src/fs/virtfs/virtfs1_unittest.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fs/virtfs/virtfs1_unittest.cc b/src/fs/virtfs/virtfs1_unittest.cc
index 4971212ef..d7a0d341c 100644
--- a/src/fs/virtfs/virtfs1_unittest.cc
+++ b/src/fs/virtfs/virtfs1_unittest.cc
@@ -1692,7 +1692,8 @@ TEST_CASE("VirtFs1 rwops_read2")
REQUIRE(file->seek(file, -6, SEEK_CUR) == 0);
}
- file->close(file);
+ if (file != nullptr)
+ file->close(file);
free(buffer);
VirtFs::unmountZip(prefix + "test2.zip");
VirtFs::deinit();
@@ -1864,7 +1865,8 @@ TEST_CASE("VirtFs1 rwops_read3")
REQUIRE(file->seek(file, -6, SEEK_CUR) == 0);
}
- file->close(file);
+ if (file != nullptr)
+ file->close(file);
free(buffer);
VirtFs::unmountDir(prefix + "data");
VirtFs::deinit();