Fix null reference error
This commit is contained in:
parent
f190e27948
commit
5dcc91e4a1
@ -135,7 +135,6 @@ namespace RehauSku.PriceListTools
|
||||
protected int? GetPositionRow(Range range, string sku, string group)
|
||||
{
|
||||
Range found = range.Find(sku);
|
||||
string foundGroupValue;
|
||||
|
||||
if (found == null)
|
||||
{
|
||||
@ -146,9 +145,11 @@ namespace RehauSku.PriceListTools
|
||||
|
||||
while (true)
|
||||
{
|
||||
foundGroupValue = TargetFile.Sheet.Cells[found.Row, TargetFile.GroupCell.Column].Value2.ToString();
|
||||
Range groupCell = TargetFile.Sheet.Cells[found.Row, TargetFile.GroupCell.Column];
|
||||
|
||||
if (string.IsNullOrEmpty(group) || group.Equals(foundGroupValue))
|
||||
if (string.IsNullOrEmpty(group) ||
|
||||
string.IsNullOrEmpty(groupCell.Value2.ToString()) ||
|
||||
group.Equals(groupCell.Value2.ToString()))
|
||||
{
|
||||
return found.Row;
|
||||
}
|
||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.4")]
|
||||
[assembly: AssemblyFileVersion("1.0.4")]
|
||||
[assembly: AssemblyVersion("1.0.4.1")]
|
||||
[assembly: AssemblyFileVersion("1.0.4.1")]
|
||||
|
Loading…
Reference in New Issue
Block a user