Skip to content

Commit 005681e

Browse files
author
Jonathan Feinberg
committed
Fix NPE in PDE, affecting color picker and other Tools.
1 parent 1ebf795 commit 005681e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/processing/core/PApplet.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2369,7 +2369,9 @@ public void handleDraw() {
23692369
render();
23702370
} else {
23712371
Graphics screen = getGraphics();
2372-
screen.drawImage(g.image, 0, 0, width, height, null);
2372+
if (screen != null) {
2373+
screen.drawImage(g.image, 0, 0, width, height, null);
2374+
}
23732375
}
23742376
} else {
23752377
repaint();

0 commit comments

Comments
 (0)