Skip to content

Commit 9c32465

Browse files
committed
Correctly allocate a Gib
Fixed issues found by PVS-Studio
1 parent f9483a2 commit 9c32465

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/Activities/GibEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ void GibEditor::StuffEditedGibs(MOSRotating* pEditedObject) {
632632
// Take each proxy object and stuff it into a Gib instance which then gets stuffed into the object to be saved
633633
std::list<MovableObject*>* pProxyGibList = m_pEditorGUI->GetPlacedGibs();
634634
for (std::list<MovableObject*>::iterator gItr = pProxyGibList->begin(); gItr != pProxyGibList->end(); ++gItr) {
635-
Gib* newGib;
635+
Gib* newGib = new Gib();
636636
// Only set the refernce instance directly from the isntanceman. OWNERSHIP IS NOT TRANSFERRED!
637637
newGib->m_GibParticle = dynamic_cast<const MovableObject*>(g_PresetMan.GetEntityPreset((*gItr)->GetClassName(), (*gItr)->GetPresetName(), m_ModuleSpaceID));
638638
if (newGib->m_GibParticle) {

0 commit comments

Comments
 (0)