mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix clang-analyzer-cplusplus.NewDelete (Use of memory after it is freed)
This commit is contained in:
parent
a2465605df
commit
6a72c5c38b
|
@ -537,7 +537,7 @@ void CAutoMapper::Proceed(CLayerTiles *pLayer, int ConfigID, int Seed, int SeedO
|
|||
}
|
||||
|
||||
// clean-up
|
||||
if(pRun->m_AutomapCopy)
|
||||
if(pRun->m_AutomapCopy && pReadLayer != pLayer)
|
||||
delete pReadLayer;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue