diff options
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyWatcher.cs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyWatcher.cs b/CSharp/Ivy/IvyPPC/IvyWatcher.cs index 0db24aa..b164260 100644 --- a/CSharp/Ivy/IvyPPC/IvyWatcher.cs +++ b/CSharp/Ivy/IvyPPC/IvyWatcher.cs @@ -196,6 +196,7 @@ namespace IvyBus internal static int getPort(string net)
{
+ if (net == null) return Ivy.DEFAULT_PORT;
int sep_index = net.LastIndexOf(":");
int port = (sep_index == - 1)?Ivy.DEFAULT_PORT:Int32.Parse(net.Substring(sep_index + 1));
return port;
|