projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cd5eb4
)
Fix double free, null texture drop
author
kwolekr
<kwolekr@minetest.net>
Fri, 12 Apr 2013 21:20:05 +0000
(17:20 -0400)
committer
kwolekr
<kwolekr@minetest.net>
Fri, 12 Apr 2013 21:20:05 +0000
(17:20 -0400)
src/emerge.cpp
patch
|
blob
|
history
src/tile.cpp
patch
|
blob
|
history
diff --git
a/src/emerge.cpp
b/src/emerge.cpp
index 9d3f94d48428f5d9a97a86af268b7c0783d5592c..049b3cc1276443b04910d3fc32e84f856c9cd661 100644
(file)
--- 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 3bfb4bb884dac075f075c80ed70eea2b35faf4b6..39f47962e9da676f07fd09c5216b08ff0499f984 100644
(file)
--- 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();