From a7e868ffb13ad4d562a5d4179b6cc24c4ad2e7ba Mon Sep 17 00:00:00 2001 From: Karl 'lordkator' Bunch Date: Tue, 22 Feb 2022 20:04:32 +0000 Subject: [PATCH] [fixed] stability issue --- MMOEngine/src/engine/service/proto/BaseClient.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MMOEngine/src/engine/service/proto/BaseClient.cpp b/MMOEngine/src/engine/service/proto/BaseClient.cpp index 0b4a4647..00506cb5 100755 --- a/MMOEngine/src/engine/service/proto/BaseClient.cpp +++ b/MMOEngine/src/engine/service/proto/BaseClient.cpp @@ -992,13 +992,13 @@ BasePacket* BaseClient::receiveFragmentedPacket(Packet* pack) { } if (!fragmentedPacket->addFragment(pack)) { + error() << "addFragment failed: " << fragmentedPacket->getError() << "; fragmentedPacket: " << *fragmentedPacket << endl << "packet: " << *pack; + if (fragmentedPacket->getReferenceCount()) fragmentedPacket->release(); else delete fragmentedPacket; - error() << "addFragment failed: " << fragmentedPacket->getError() << "; fragmentedPacket: " << *fragmentedPacket << endl << "packet: " << *pack; - fragmentedPacket = nullptr; throw FragmentedPacketParseException("could not insert frag");