diff --git a/src/main/java/handiebot/HandieBot.java b/src/main/java/handiebot/HandieBot.java index 969181a..ddb116f 100644 --- a/src/main/java/handiebot/HandieBot.java +++ b/src/main/java/handiebot/HandieBot.java @@ -89,7 +89,9 @@ public class HandieBot { if (args.length >= 1) { if (args[0].equalsIgnoreCase("-nogui")){ + System.out.println("Starting with no GUI."); USE_GUI = false; + log = new BotLog(null); } } diff --git a/src/main/java/handiebot/view/BotLog.java b/src/main/java/handiebot/view/BotLog.java index 5a0d111..74ebe4e 100644 --- a/src/main/java/handiebot/view/BotLog.java +++ b/src/main/java/handiebot/view/BotLog.java @@ -42,7 +42,9 @@ public class BotLog { public BotLog(JTextPane outputArea){ this.outputArea = outputArea; - initStyles(); + if (outputArea != null) { + initStyles(); + } } /**