StoreDev / StoreLib

Storelib is a DotNet library that provides APIs to interact with the various Microsoft Store endpoints.
Mozilla Public License 2.0
139 stars 47 forks source link

Fix NullReferenceException for empty package #11

Closed davispuh closed 3 years ago

davispuh commented 3 years ago

Fixes

Packages.Count == 0
System.Collections.Generic.List`1[StoreLib.Models.Package]
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at StoreLib.Cli.CommandHandler.PackagesAsync(DisplayCatalogHandler dcatHandler, String id, IdentiferType type) in StoreLib\StoreLib.Cli\CommandHandler.cs:line 114
   at StoreLib.Cli.Program.Run(Options opts) in StoreLib\StoreLib.Cli\Program.cs:line 88
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at StoreLib.Cli.Program.Main(String[] args) in StoreLib\StoreLib.Cli\Program.cs:line 60