summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fs/virtfs/virtfsziprwops.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fs/virtfs/virtfsziprwops.cpp b/src/fs/virtfs/virtfsziprwops.cpp
index be7d85230..24162e129 100644
--- a/src/fs/virtfs/virtfsziprwops.cpp
+++ b/src/fs/virtfs/virtfsziprwops.cpp
@@ -139,7 +139,9 @@ namespace VirtFsZip
{
VirtFile *const handle = static_cast<VirtFile *const>(
rw->hidden.unknown.data1);
- return VirtFs::fileLength(handle);
+ if (!rw)
+ return 0;
+ return handle->mSize;
}
#endif // USE_SDL2