Initialize noise ptr on creation (fixes crash if OreVein deleted before use)
parent
77e20a0c21
commit
0330cec7ec
|
@ -263,6 +263,12 @@ void OreBlob::generate(MMVManip *vm, int mapseed, u32 blockseed,
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
OreVein::OreVein()
|
||||||
|
{
|
||||||
|
noise2 = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
OreVein::~OreVein()
|
OreVein::~OreVein()
|
||||||
{
|
{
|
||||||
delete noise2;
|
delete noise2;
|
||||||
|
|
|
@ -105,6 +105,7 @@ public:
|
||||||
float random_factor;
|
float random_factor;
|
||||||
Noise *noise2;
|
Noise *noise2;
|
||||||
|
|
||||||
|
OreVein();
|
||||||
virtual ~OreVein();
|
virtual ~OreVein();
|
||||||
|
|
||||||
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,
|
virtual void generate(MMVManip *vm, int mapseed, u32 blockseed,
|
||||||
|
|
Loading…
Reference in New Issue