From c6caba7598426f8f6ea4a342bc3ae9d1f1305f40 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Thu, 10 Oct 2024 16:54:34 +0100 Subject: [PATCH] The `RenderTarget.willResize` method will now check if the values given to it are actually numbers. If not it will return false. --- src/renderer/webgl/RenderTarget.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/webgl/RenderTarget.js b/src/renderer/webgl/RenderTarget.js index d95f02f90..3bcb9797c 100644 --- a/src/renderer/webgl/RenderTarget.js +++ b/src/renderer/webgl/RenderTarget.js @@ -256,6 +256,11 @@ var RenderTarget = new Class({ */ willResize: function (width, height) { + if (typeof width !== 'number' || typeof height !== 'number') + { + return false; + } + width = Math.round(width * this.scale); height = Math.round(height * this.scale);