diff options
author | kwolekr <kwolekr@minetest.net> | 2013-04-12 17:20:05 -0400 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2013-04-12 17:20:05 -0400 |
commit | ce901f4c4ca97dee5ab0a3a0d3e14cf7f1cf0154 (patch) | |
tree | 8af68a99c95cc79f290366c5910de70b58ba6b7a | |
parent | 7cd5eb4c77de9fda4946de7e1c2384d0c2a0253e (diff) | |
download | minetest-ce901f4c4ca97dee5ab0a3a0d3e14cf7f1cf0154.tar.gz minetest-ce901f4c4ca97dee5ab0a3a0d3e14cf7f1cf0154.tar.bz2 minetest-ce901f4c4ca97dee5ab0a3a0d3e14cf7f1cf0154.zip |
Fix double free, null texture drop
-rw-r--r-- | src/emerge.cpp | 3 | ||||
-rw-r--r-- | src/tile.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/emerge.cpp b/src/emerge.cpp index 9d3f94d48..049b3cc12 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -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++) diff --git a/src/tile.cpp b/src/tile.cpp index 3bfb4bb88..39f47962e 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -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(); |