mirror of
https://github.com/minetest/minetest.git
synced 2024-12-28 08:57:30 +01:00
Initialize noise ptr on creation (fixes crash if OreVein deleted before use)
This commit is contained in:
parent
77e20a0c21
commit
0330cec7ec
@ -263,6 +263,12 @@ void OreBlob::generate(MMVManip *vm, int mapseed, u32 blockseed,
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
OreVein::OreVein()
|
||||
{
|
||||
noise2 = NULL;
|
||||
}
|
||||
|
||||
|
||||
OreVein::~OreVein()
|
||||
{
|
||||
delete noise2;
|
||||
|
@ -105,6 +105,7 @@ public:
|
||||
float random_factor;
|
||||
Noise *noise2;
|
||||
|
||||
OreVein();
|
||||
virtual ~OreVein();
|
||||
|
||||
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,
|
||||
|
Loading…
Reference in New Issue
Block a user