Skip to content

Commit c882ebe

Browse files
committed
Added undefined check processPixelRGB
Phaser.BitmapData#processPixelRGB: I was getting an undefined error when phaser tried to call setPixel32 using “result.r”. With this additional undefined check the problem stopped and I’m able to run this method with all my needed images.
1 parent 041bbd4 commit c882ebe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/gameobjects/BitmapData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ Phaser.BitmapData.prototype = {
335335

336336
result = callback.call(callbackContext, pixel, tx, ty);
337337

338-
if (result !== false && result !== null)
338+
if (result !== false && result !== null && result !== undefined)
339339
{
340340
this.setPixel32(tx, ty, result.r, result.g, result.b, result.a, false);
341341
dirty = true;

0 commit comments

Comments
 (0)