diff --git a/modules/noise/noise_texture_3d.cpp b/modules/noise/noise_texture_3d.cpp index f2e01b06125f..1e929e6f637c 100644 --- a/modules/noise/noise_texture_3d.cpp +++ b/modules/noise/noise_texture_3d.cpp @@ -142,6 +142,8 @@ TypedArray NoiseTexture3D::_generate_texture() { return TypedArray(); } + ERR_FAIL_COND_V_MSG((int64_t)width * height * depth > Image::MAX_PIXELS, TypedArray(), "The NoiseTexture3D is too big, consider lowering its width, height, or depth."); + Vector> images; if (seamless) {