From c56844f6f10fc12410b6554fbefe361bfd8630f6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Mar 2017 18:03:41 +0300 Subject: Fix closing physfs files. --- src/fs/physfs/virtfileprivate.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fs/physfs/virtfileprivate.cpp b/src/fs/physfs/virtfileprivate.cpp index 9df6e9578..4fcc0968e 100644 --- a/src/fs/physfs/virtfileprivate.cpp +++ b/src/fs/physfs/virtfileprivate.cpp @@ -26,3 +26,9 @@ VirtFilePrivate::VirtFilePrivate(PHYSFS_file *restrict const file) : mFile(file) { } + +VirtFilePrivate::~VirtFilePrivate() +{ + if (mFile != nullptr) + PHYSFS_close(mFile); +} -- cgit v1.2.3-70-g09d2