HPL1: Fix use after free in error message. PVS-Studio V774

This commit is contained in:
sluicebox 2023-10-31 14:20:28 -07:00
parent 1bfd160c92
commit 5818c4be33

View File

@ -410,8 +410,8 @@ bool cWorld2D::CreateFromFile(tString asFile) {
/*Maybe delete entity if no type found? */
}
} else {
hplDelete(pEntity);
Error("Couldn't load data for entity '%s'", pEntity->GetName().c_str());
hplDelete(pEntity);
}
} else {
error("No other Render mode for entity exist!!");