Fix possible null assignment to non-nullable entities.

This commit is contained in:
2023-10-04 09:55:17 +01:00
parent 2a6e052a62
commit bc8bf7a2dc
27 changed files with 55 additions and 36 deletions

View File

@@ -30,6 +30,7 @@
// Copyright © 2011-2023 Natalia Portillo
// ****************************************************************************/
using System;
using System.CommandLine;
using System.CommandLine.NamingConventionBinder;
using Aaru.CommonTypes;
@@ -65,7 +66,7 @@ sealed class EntropyCommand : Command
Name = "image-path"
});
Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke)));
Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke)) ?? throw new NullReferenceException());
}
public static int Invoke(bool debug, bool verbose, bool duplicatedSectors, string imagePath, bool separatedTracks,