2008-01-25 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mcs / class / System.Runtime.Remoting / System.Runtime.Remoting.Channels.Tcp / TcpChannel.cs
index de8d9a692fcb357239ea3b46c9c8d9c29fed43a1..2974071b1d039884751dd6a1f19a3bf802240a98 100644 (file)
@@ -57,14 +57,16 @@ namespace System.Runtime.Remoting.Channels.Tcp
                {
                        _clientChannel = new TcpClientChannel (properties,clientSink);
 
-                       if(properties["port"] != null)
-                               _serverChannel = new TcpServerChannel(properties, serverSink);
+                       if (properties != null) {
+                               if(properties["port"] != null)
+                                       _serverChannel = new TcpServerChannel(properties, serverSink);
 
-                       object val = properties ["name"];
-                       if (val != null) _name = val as string;
+                               object val = properties ["name"];
+                               if (val != null) _name = val as string;
                        
-                       val = properties ["priority"];
-                       if (val != null) _priority = Convert.ToInt32 (val);
+                               val = properties ["priority"];
+                               if (val != null) _priority = Convert.ToInt32 (val);
+                       }
                }