diff --git a/core/PGraphics.java b/core/PGraphics.java index 1b0d632df..c7298a7fd 100644 --- a/core/PGraphics.java +++ b/core/PGraphics.java @@ -1987,6 +1987,10 @@ public class PGraphics extends PImage implements PConstants { * ignored. */ public void text(String str, float x, float y) { + if (textFont == null) { + throw new RuntimeException("use textFont() before text()"); + } + if (textMode == SCREEN) loadPixels(); int length = str.length();