aboutsummaryrefslogtreecommitdiff
path: root/drivers/windows/dir_access_windows.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2016-06-18 11:32:45 -0300
committerJuan Linietsky2016-06-18 11:32:45 -0300
commite3905a084e614738fa6565144bf364b8f364f2ae (patch)
tree6d375fa7e86e2b6c83814959723ea013d775ba91 /drivers/windows/dir_access_windows.cpp
parent61655d6dc2912424de937e2870b6a5ad346c3daf (diff)
downloadgodot-e3905a084e614738fa6565144bf364b8f364f2ae.tar.gz
godot-e3905a084e614738fa6565144bf364b8f364f2ae.tar.zst
godot-e3905a084e614738fa6565144bf364b8f364f2ae.zip
Diffstat (limited to 'drivers/windows/dir_access_windows.cpp')
-rw-r--r--drivers/windows/dir_access_windows.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index f64eb036c..6cd494de4 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -359,7 +359,8 @@ FileType DirAccessWindows::get_file_type(const String& p_file) const {
size_t DirAccessWindows::get_space_left() {
uint64_t bytes = 0;
- GetDiskFreeSpaceEx(NULL,(PULARGE_INTEGER)&bytes,NULL,NULL);
+ if (!GetDiskFreeSpaceEx(NULL,(PULARGE_INTEGER)&bytes,NULL,NULL))
+ return 0;
//this is either 0 or a value in bytes.
return (size_t)bytes;