delete before crapping out

This commit is contained in:
CodeCodon
2015-08-06 11:04:26 -05:00
parent c18a4ca869
commit 2ad314a8de
@@ -1999,6 +1999,7 @@ ShipComponentData * ShipObject::createShipComponentData (int chassisSlot) const
if (shipComponentData == NULL)
{
WARNING (true, ("ShipObject::createShipComponentData failed for slot [%d] ship Component data could not be constructed", chassisSlot));
delete(shipComponentData);
return NULL;
}