浏览代码

Fix `NoiseTexture._generate_texture` crash

Fixes #59915 .
Paweł Fertyk 3 年之前
父节点
当前提交
79b4844be5
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      modules/noise/noise.h

+ 1 - 0
modules/noise/noise.h

@@ -101,6 +101,7 @@ class Noise : public Resource {
 		on Source it's translated to
 		corner of Q1/s3 unless the ALT_XY modulo moves it to Q4
 		*/
+		ERR_FAIL_COND_V(p_blend_skirt < 0, Ref<Image>());
 
 		int skirt_width = MAX(1, p_width * p_blend_skirt);
 		int skirt_height = MAX(1, p_height * p_blend_skirt);