Skip to content

Commit

Permalink
Fix double free, null texture drop
Browse files Browse the repository at this point in the history
  • Loading branch information
kwolekr committed Apr 12, 2013
1 parent 7cd5eb4 commit ce901f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/emerge.cpp
Expand Up @@ -97,9 +97,6 @@ EmergeManager::~EmergeManager() {
delete mapgen[i];
}
emergethread.clear();

for (unsigned int i = 0; i < mapgen.size(); i++)
delete mapgen[i];
mapgen.clear();

for (unsigned int i = 0; i < ores.size(); i++)
Expand Down
3 changes: 2 additions & 1 deletion src/tile.cpp
Expand Up @@ -480,7 +480,8 @@ TextureSource::~TextureSource()
driver->removeTexture(t);

//cleanup source image
iter->atlas_img->drop();
if (iter->atlas_img)
iter->atlas_img->drop();
}
m_atlaspointer_cache.clear();

Expand Down

0 comments on commit ce901f4

Please sign in to comment.