Initialize noise ptr on creation (fixes crash if OreVein deleted before use)

This commit is contained in:
kwolekr 2015-01-15 12:46:42 -05:00
parent 77e20a0c21
commit 0330cec7ec
2 changed files with 7 additions and 0 deletions

@ -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,