summaryrefslogtreecommitdiff
path: root/src/os/windows/win32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/windows/win32.cpp')
-rw-r--r--src/os/windows/win32.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp
index 073f70b98..ddcfd4866 100644
--- a/src/os/windows/win32.cpp
+++ b/src/os/windows/win32.cpp
@@ -247,7 +247,7 @@ bool FiosGetDiskFreeSpace(const char *path, uint64 *tot)
ULARGE_INTEGER bytes_free;
bool retval = GetDiskFreeSpaceEx(OTTD2FS(path).c_str(), &bytes_free, nullptr, nullptr);
- if (retval) *tot = bytes_free.QuadPart;
+ if (retval && tot != nullptr) *tot = bytes_free.QuadPart;
SetErrorMode(sem); // reset previous setting
return retval;