Fix double free, null texture drop
parent
7cd5eb4c77
commit
ce901f4c4c
|
@ -97,9 +97,6 @@ EmergeManager::~EmergeManager() {
|
||||||
delete mapgen[i];
|
delete mapgen[i];
|
||||||
}
|
}
|
||||||
emergethread.clear();
|
emergethread.clear();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < mapgen.size(); i++)
|
|
||||||
delete mapgen[i];
|
|
||||||
mapgen.clear();
|
mapgen.clear();
|
||||||
|
|
||||||
for (unsigned int i = 0; i < ores.size(); i++)
|
for (unsigned int i = 0; i < ores.size(); i++)
|
||||||
|
|
|
@ -480,7 +480,8 @@ TextureSource::~TextureSource()
|
||||||
driver->removeTexture(t);
|
driver->removeTexture(t);
|
||||||
|
|
||||||
//cleanup source image
|
//cleanup source image
|
||||||
iter->atlas_img->drop();
|
if (iter->atlas_img)
|
||||||
|
iter->atlas_img->drop();
|
||||||
}
|
}
|
||||||
m_atlaspointer_cache.clear();
|
m_atlaspointer_cache.clear();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue