diff --git a/DiscImageChef/Commands/ExtractFiles.cs b/DiscImageChef/Commands/ExtractFiles.cs index 36b2c3345..2c4bd2155 100644 --- a/DiscImageChef/Commands/ExtractFiles.cs +++ b/DiscImageChef/Commands/ExtractFiles.cs @@ -163,6 +163,12 @@ namespace DiscImageChef.Commands imageFormat.Id); else DicConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + if (outputDir == null) + { + DicConsole.WriteLine("Output directory missing."); + return (int)ErrorNumber.MissingArgument; + } + if(Directory.Exists(outputDir) || File.Exists(outputDir)) { DicConsole.ErrorWriteLine("Destination exists, aborting."); @@ -519,4 +525,4 @@ namespace DiscImageChef.Commands } } } -} \ No newline at end of file +}