Fixed possible crash

This commit is contained in:
Pontus Fransson 2013-11-22 14:31:07 +01:00
parent d33220f8ca
commit 6eff55e763
2 changed files with 2 additions and 8 deletions

View File

@ -19,10 +19,10 @@ unsigned char* Translator::Translate( ProtocolHeader &header )
break; break;
} }
message->Translate(header, this->msg);
if(message != NULL) if(message != NULL)
{ {
message->Translate(header, this->msg);
delete message; delete message;
message = NULL; message = NULL;
} }

View File

@ -31,12 +31,6 @@ int main()
chat(client); chat(client);
//Recieve message
//client.Recv(msgRecv);
//print message
//cout << msgRecv << endl;
ShutdownSockets(); ShutdownSockets();
system("pause"); system("pause");