commercetools / commercetools-dotnet-core-sdk

The e-commerce SDK from commercetools running on the .NET Core platform
https://docs.commercetools.com/sdk/dotnet-sdk#net-core-sdk
Apache License 2.0
10 stars 5 forks source link

Null reference exception in BaseMoney operators #181

Closed andersekdahl closed 3 years ago

andersekdahl commented 3 years ago

Describe the bug The operator overloads for BaseMoney does not handle comparing with null here: https://github.com/commercetools/commercetools-dotnet-core-sdk/blob/master/commercetools.Sdk/commercetools.Sdk.Domain/Common/BaseMoney.cs#L33-L61

To Reproduce Compare a price with null, like somePrice == null.

Expected behavior The operator overloads should be able to handle null values.

Stack information (please complete the following information):

MicheleRezk commented 3 years ago

@andersekdahl We solved it and created a new release with version 1.1.4