Skip to content

Commit

Permalink
Merge pull request #83978 from jsjtxietian/fix-FastNoiseLite.get_seam…
Browse files Browse the repository at this point in the history
…less_image-crash-on-bad-input

Fix `FastNoiseLite.get_seamless_image` function crash with bad param
  • Loading branch information
akien-mga committed Oct 26, 2023
2 parents 8d3820d + 1fafca5 commit 7443fb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/noise/noise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ Vector<Ref<Image>> Noise::_get_seamless_image(int p_width, int p_height, int p_d

Ref<Image> Noise::get_seamless_image(int p_width, int p_height, bool p_invert, bool p_in_3d_space, real_t p_blend_skirt, bool p_normalize) const {
Vector<Ref<Image>> images = _get_seamless_image(p_width, p_height, 1, p_invert, p_in_3d_space, p_blend_skirt, p_normalize);
if (images.size() == 0) {
return Ref<Image>();
}
return images[0];
}

Expand Down

0 comments on commit 7443fb2

Please sign in to comment.