summaryrefslogtreecommitdiff
path: root/src/fs
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-04-01 17:41:43 +0300
committerAndrei Karas <akaras@inbox.ru>2017-04-01 17:41:43 +0300
commit0ab16aceb300ab87d604c6cc4db345f979ad1560 (patch)
tree2401f0d4ad8ab2251d17218321d553adfaaebb3d /src/fs
parent84afd0b5c1a60078d9e64cea513202619a1cd1e8 (diff)
downloadmanaverse-0ab16aceb300ab87d604c6cc4db345f979ad1560.tar.gz
manaverse-0ab16aceb300ab87d604c6cc4db345f979ad1560.tar.bz2
manaverse-0ab16aceb300ab87d604c6cc4db345f979ad1560.tar.xz
manaverse-0ab16aceb300ab87d604c6cc4db345f979ad1560.zip
Fix unit tests failures on FreeBSD.
Diffstat (limited to 'src/fs')
-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();