Browse Source

fix possible crash in tools/editor/editor_import_export.cpp

da could be NULL, and dereferencing NULL could lead to crash
Hubert Jarosz 9 years ago
parent
commit
19ea9ae1e5
1 changed files with 1 additions and 2 deletions
  1. 1 2
      tools/editor/editor_import_export.cpp

+ 1 - 2
tools/editor/editor_import_export.cpp

@@ -281,6 +281,7 @@ static void _edit_filter_list(Set<StringName>& r_list,const String& p_filter,boo
 	}
 	}
 
 
 	DirAccess *da = DirAccess::open("res://");
 	DirAccess *da = DirAccess::open("res://");
+	ERR_FAIL_NULL(da);
 	_edit_files_with_filter(da,filters,r_list,exclude);
 	_edit_files_with_filter(da,filters,r_list,exclude);
 	memdelete(da);
 	memdelete(da);
 }
 }
@@ -2217,5 +2218,3 @@ EditorImportExport::~EditorImportExport() {
 
 
 
 
 }
 }
-
-