Skip to content

Commit

Permalink
The RenderTarget.willResize method will now check if the values giv…
Browse files Browse the repository at this point in the history
…en to it are actually numbers. If not it will return false.
  • Loading branch information
photonstorm committed Oct 10, 2024
1 parent acc96c7 commit c6caba7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderer/webgl/RenderTarget.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c6caba7

Please sign in to comment.