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

@ -962,6 +962,7 @@ Error ProjectSettings::_save_custom_bnd(const String &p_file) { // add other par
#ifdef TOOLS_ENABLED
bool _csproj_exists(String p_root_dir) {
Ref<DirAccess> dir = DirAccess::open(p_root_dir);
ERR_FAIL_COND_V(dir.is_null(), false);
dir->list_dir_begin();
String file_name = dir->_get_next();