avoid a possible NRE
This commit is contained in:
@@ -55,11 +55,15 @@ namespace OpenRA
|
||||
|
||||
public static bool TryParse(string s, out WRange result)
|
||||
{
|
||||
result = WRange.Zero;
|
||||
|
||||
if (string.IsNullOrEmpty(s))
|
||||
return false;
|
||||
|
||||
s = s.ToLowerInvariant();
|
||||
var components = s.Split('c');
|
||||
var cell = 0;
|
||||
var subcell = 0;
|
||||
result = WRange.Zero;
|
||||
|
||||
switch (components.Length)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user