TSimpleDirEnumerator.EnumDirsOnly raises an access violation when List is nil
Brought to you by:
twm
The TStrings overload of TSimpleDirEnumerator.EnumDirsOnly in src/u_dzFileUtils.pas calls _List.AddStrings(List) unconditionally, although its doc comment says the list "may be nil". So TSimpleDirEnumerator.EnumDirsOnly('c:\somedir\*', nil) raises an access violation. EnumFilesOnly and the recursive EnumFilesOnly already check it with if Assigned(_List) then.
Found by a GExperts session while adding directory drops to the standalone Code Formatter; GExperts uses the TStringDynArray overload instead.
Fix: the same Assigned check in EnumDirsOnly.
Fixed in revision #2383.