Explorar el Código

Add check before queueing a packet for sending

NX hace 7 años
padre
commit
154e0cf83e
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Source/Managed/ENet.cs

+ 2 - 0
Source/Managed/ENet.cs

@@ -680,6 +680,8 @@ namespace ENet {
 		public bool Send(byte channelID, ref Packet packet) {
 			CheckCreated();
 
+			packet.CheckCreated();
+
 			return Native.enet_peer_send(nativePeer, channelID, packet.NativeData) == 0;
 		}