Add error checks for DirAccess creation.

This commit is contained in:
Saracen 2023-09-26 03:07:43 +01:00
parent 43b9e89a07
commit 3f4513d4de
10 changed files with 26 additions and 0 deletions

View file

@ -1383,6 +1383,8 @@ void EditorExportPlatform::zip_folder_recursive(zipFile &p_zip, const String &p_
String dir = p_folder.is_empty() ? p_root_path : p_root_path.path_join(p_folder);
Ref<DirAccess> da = DirAccess::open(dir);
ERR_FAIL_COND(da.is_null());
da->list_dir_begin();
String f = da->get_next();
while (!f.is_empty()) {