diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-04-01 17:41:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-04-01 17:41:43 +0300 |
commit | 0ab16aceb300ab87d604c6cc4db345f979ad1560 (patch) | |
tree | 2401f0d4ad8ab2251d17218321d553adfaaebb3d /src/fs/virtfs | |
parent | 84afd0b5c1a60078d9e64cea513202619a1cd1e8 (diff) | |
download | plus-0ab16aceb300ab87d604c6cc4db345f979ad1560.tar.gz plus-0ab16aceb300ab87d604c6cc4db345f979ad1560.tar.bz2 plus-0ab16aceb300ab87d604c6cc4db345f979ad1560.tar.xz plus-0ab16aceb300ab87d604c6cc4db345f979ad1560.zip |
Fix unit tests failures on FreeBSD.
Diffstat (limited to 'src/fs/virtfs')
-rw-r--r-- | src/fs/virtfs/virtfs1_unittest.cc | 6 |
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(); |