diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index a3da447dc..66dd94c9f 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -1312,8 +1312,8 @@ void CClientEditionModule::onUserComponentDownloaded(NLNET::IModuleProxy *sender if (decompressionState != Z_OK) { - delete component; - nlwarning("Error: the downloaded user component is corrupted '%s' ", component->Filename.c_str()); + nlwarning("Error: the downloaded user component is corrupted '%s'", component->Filename.c_str()); + delete component; return; } component->UncompressedData[component->UncompressedDataLength] = '\0';