@@ -3339,6 +3339,6 @@ void ShapeBase::ejectShellCasing( U32 imageSlot )
if (!casing->registerObject())
delete casing;
-
- casing->init( shellPos, shellVel );
+ else
+ casing->init( shellPos, shellVel );
}
@@ -128,8 +128,7 @@ static void processNodeLights(AppNode* appNode, const MatrixF& offset, SimGroup*
Con::errorf(ConsoleLogEntry::General, "Failed to register light for \"%s\"", lightName.c_str());
delete pLight;
- if (group)
+ else if (group)
group->addObject(pLight);