don't crash if we get passed in a null string
This commit is contained in:
parent
138c5c03ba
commit
2398a9e087
@ -32,7 +32,14 @@ namespace UniversalEditor
|
||||
long offset = 0;
|
||||
for (int i = 0; i < index; i++)
|
||||
{
|
||||
offset += list[i].Length + additionalPadding;
|
||||
if (list[i] == null)
|
||||
{
|
||||
offset += additionalPadding;
|
||||
}
|
||||
else
|
||||
{
|
||||
offset += list[i].Length + additionalPadding;
|
||||
}
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user