From 0ab16aceb300ab87d604c6cc4db345f979ad1560 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 1 Apr 2017 17:41:43 +0300 Subject: Fix unit tests failures on FreeBSD. --- src/fs/virtfs/virtfs1_unittest.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/fs/virtfs/virtfs1_unittest.cc') 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(); -- cgit v1.2.3-70-g09d2