From 3e3f54c3cab41ace46fbf93f3ca1036c378bbdf1 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 6 May 2020 13:30:24 +0200 Subject: [PATCH] EditorConsole: Allow base to be null This allows testing this class without going to a full initialization. --- app/src/processing/app/EditorConsole.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/EditorConsole.java b/app/src/processing/app/EditorConsole.java index 5640e9bc4..f5d569429 100644 --- a/app/src/processing/app/EditorConsole.java +++ b/app/src/processing/app/EditorConsole.java @@ -112,7 +112,8 @@ public class EditorConsole extends JScrollPane { EditorConsole.init(stdOutStyle, System.out, stdErrStyle, System.err); // Add font size adjustment listeners. - base.addEditorFontResizeListeners(consoleTextPane); + if (base != null) + base.addEditorFontResizeListeners(consoleTextPane); } public void applyPreferences() {