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:
77e20a0
)
Initialize noise ptr on creation (fixes crash if OreVein deleted before use)
author
kwolekr
<kwolekr@minetest.net>
Thu, 15 Jan 2015 17:46:42 +0000
(12:46 -0500)
committer
kwolekr
<kwolekr@minetest.net>
Thu, 15 Jan 2015 21:23:04 +0000
(16:23 -0500)
src/mg_ore.cpp
patch
|
blob
|
history
src/mg_ore.h
patch
|
blob
|
history
diff --git
a/src/mg_ore.cpp
b/src/mg_ore.cpp
index dfcb1a1d9f6d31338aedb835a35819afea07e703..c62f05860edb72078c98bfcb2e88630d75b2df9c 100644
(file)
--- a/
src/mg_ore.cpp
+++ b/
src/mg_ore.cpp
@@
-263,6
+263,12
@@
void OreBlob::generate(MMVManip *vm, int mapseed, u32 blockseed,
///////////////////////////////////////////////////////////////////////////////
+OreVein::OreVein()
+{
+ noise2 = NULL;
+}
+
+
OreVein::~OreVein()
{
delete noise2;
diff --git
a/src/mg_ore.h
b/src/mg_ore.h
index ea713cfcc70de65212ca18356c18e4c5dd3686e0..67ca9a849630f03d1ad5801ab157ecf4e10874e1 100644
(file)
--- a/
src/mg_ore.h
+++ b/
src/mg_ore.h
@@
-105,6
+105,7
@@
public:
float random_factor;
Noise *noise2;
+ OreVein();
virtual ~OreVein();
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,