summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fs/physfs/virtfileprivate.cpp6
1 files changed, 6 insertions, 0 deletions
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);
+}