diff options
author | Sergey Chebotar <s.chebotar@gmail.com> | 2023-05-24 10:48:52 +0300 |
---|---|---|
committer | Sergey Chebotar <s.chebotar@gmail.com> | 2023-05-24 10:48:52 +0300 |
commit | d058b3ed4e9b954e9b264d79e6257a44b31b2d07 (patch) | |
tree | fd57a70a70c0e05116c8c5e57335ff9271300039 | |
parent | 79eeb2a20668875bc9333471125ea30efe43b043 (diff) |
Fix null reference exception
-rw-r--r-- | RhSolutions.AddIn/Services/GuessReader.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/RhSolutions.AddIn/Services/GuessReader.cs b/RhSolutions.AddIn/Services/GuessReader.cs index 2f6c3c6..93609d0 100644 --- a/RhSolutions.AddIn/Services/GuessReader.cs +++ b/RhSolutions.AddIn/Services/GuessReader.cs @@ -161,6 +161,10 @@ public class GuessReader : IReader var productCells = productColumn.Value2; object currentProductCell = productColumn.Rows.Count == 1 ? productCells : productCells[row, 1]; + if (currentProductCell == null) + { + continue; + } if (ProductSku.TryParse(currentProductCell.ToString(), out IEnumerable<ProductSku> skus)) { |