diff options
Diffstat (limited to 'src/network/connection.cpp')
-rw-r--r-- | src/network/connection.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/network/connection.cpp b/src/network/connection.cpp index fb31a07f0..69deb4dd5 100644 --- a/src/network/connection.cpp +++ b/src/network/connection.cpp @@ -1725,9 +1725,8 @@ void ConnectionSendThread::connect(Address address) // Send a dummy packet to server with peer_id = PEER_ID_INEXISTENT m_connection->SetPeerID(PEER_ID_INEXISTENT); - NetworkPacket* pkt = new NetworkPacket(0,0); - m_connection->Send(PEER_ID_SERVER, 0, pkt, true); - delete pkt; + NetworkPacket pkt(0,0); + m_connection->Send(PEER_ID_SERVER, 0, &pkt, true); } void ConnectionSendThread::disconnect() |