Try fix NPE
This commit is contained in:
parent
2399a1ba65
commit
e646141055
@ -20,7 +20,6 @@ namespace Network {
|
||||
|
||||
public override void Initialize(string address, int port) {
|
||||
GD.print("Start client.");
|
||||
GD.print("Starting to send stuff to " + address + ":" + port);
|
||||
ServerConn = new Connection(address, port);
|
||||
ServerConn.Name = "Server";
|
||||
ConnectionList.AddConnection(ServerConn);
|
||||
|
@ -34,9 +34,9 @@ namespace Network.Syncing {
|
||||
|
||||
public void HandleRawPacket(PacketBuffer packetBuffer, Connection connection) {
|
||||
var Handler = GetHandlerFor(connection);
|
||||
if (!Handler.HasValue) {
|
||||
Handler = new ConnectionHandler(Peer, connection);
|
||||
HandlerList.Add(Handler);
|
||||
if (Handler.isEmpty) {
|
||||
var Temp = new ConnectionHandler(Peer, connection);
|
||||
HandlerList.Add(Temp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user