diff options
| author | Juan Linietsky | 2016-06-18 11:32:45 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2016-06-18 11:32:45 -0300 |
| commit | e3905a084e614738fa6565144bf364b8f364f2ae (patch) | |
| tree | 6d375fa7e86e2b6c83814959723ea013d775ba91 /drivers/windows/dir_access_windows.cpp | |
| parent | 61655d6dc2912424de937e2870b6a5ad346c3daf (diff) | |
| download | godot-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.cpp | 3 |
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; |
