Skip to content

Commit

Permalink
fix crash with delete on CItemMultiCustom destructor (#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
raydienull authored Sep 23, 2023
1 parent 797ba28 commit 4e46531
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/game/items/CItemMultiCustom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,31 +53,31 @@ CItemMultiCustom::~CItemMultiCustom()
m_designMain.m_vectorComponents.clear();
if (m_designMain.m_pData != nullptr)
{
delete[] m_designMain.m_pData;
delete m_designMain.m_pData;
}

for (CMultiComponent* pComp : m_designWorking.m_vectorComponents)
delete pComp;
m_designWorking.m_vectorComponents.clear();
if (m_designWorking.m_pData != nullptr)
{
delete[] m_designWorking.m_pData;
delete m_designWorking.m_pData;
}

for (CMultiComponent* pComp : m_designBackup.m_vectorComponents)
delete pComp;
m_designBackup.m_vectorComponents.clear();
if (m_designBackup.m_pData != nullptr)
{
delete[] m_designBackup.m_pData;
delete m_designBackup.m_pData;
}

for (CMultiComponent* pComp : m_designRevert.m_vectorComponents)
delete pComp;
m_designRevert.m_vectorComponents.clear();
if (m_designRevert.m_pData != nullptr)
{
delete[] m_designRevert.m_pData;
delete m_designRevert.m_pData;
}
}

Expand Down

0 comments on commit 4e46531

Please sign in to comment.