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

dcathandler.GetPackagesForProductAsync() returning System.NullReference if product is null (fix in description) #15

Open tinedpakgamer opened 2 years ago

tinedpakgamer commented 2 years ago

When we query a package and its product is null but not products property then get packages throws exception. Following code can be used to fix the issue

if (dcathandler.ProductListing.Product == null) dcathandler.ProductListing.Product = dcathandler.ProductListing.Products[0]; var g = await dcathandler.GetPackagesForProductAsync();