Skip to content

Commit

Permalink
Noise: Correct noise objects created with invalid dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
kwolekr committed Apr 20, 2015
1 parent 386d695 commit 687d969
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/noise.cpp
Expand Up @@ -485,6 +485,13 @@ Noise::~Noise()

void Noise::allocBuffers()
{
if (sx < 1)
sx = 1;
if (sy < 1)
sy = 1;
if (sz < 1)
sz = 1;

this->noise_buf = NULL;
resizeNoiseBuf(sz > 1);

Expand Down

0 comments on commit 687d969

Please sign in to comment.