mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 14:12:51 +00:00
Fix FastNoiseLite.get_seamless_image function will crashes with bad param
This commit is contained in:
parent
ea0ab441c8
commit
1fafca56a6
@ -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 {
|
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);
|
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];
|
return images[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user