StoreDev / StoreLib

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

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

Open MCenters opened 2 years ago

MCenters 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();