Fix pointer accessed after delete

This commit is contained in:
Jan Boon 2018-08-24 09:30:56 +08:00 committed by GitHub
parent 37ce82dc13
commit 0f44a7da27
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1312,8 +1312,8 @@ void CClientEditionModule::onUserComponentDownloaded(NLNET::IModuleProxy *sender
if (decompressionState != Z_OK)
{
nlwarning("Error: the downloaded user component is corrupted '%s'", component->Filename.c_str());
delete component;
nlwarning("Error: the downloaded user component is corrupted '%s' ", component->Filename.c_str());
return;
}
component->UncompressedData[component->UncompressedDataLength] = '\0';