diff --git a/core/src/processing/core/PGraphicsJava2D.java b/core/src/processing/core/PGraphicsJava2D.java index a42f1ea3f..af906a6dd 100644 --- a/core/src/processing/core/PGraphicsJava2D.java +++ b/core/src/processing/core/PGraphicsJava2D.java @@ -1302,9 +1302,10 @@ public class PGraphicsJava2D extends PGraphics { if (who.modified) { if (who.pixels == null) { - // This might be a PGraphics that hasn't been drawn to yet, bail out. + // This might be a PGraphics that hasn't been drawn to yet. + // Can't just bail because the cache has been created above. // https://github.com/processing/processing/issues/2208 - return; + who.pixels = new int[who.width * who.height]; } cash.update(who, tint, tintColor); who.modified = false;