Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix NPE on start up

  • Loading branch information...
commit 6f58552c84ccfe8d43c8a323ca5b8248202cbe06 1 parent d5d1e0e
@alta189 alta189 authored
View
4 src/main/java/com/alta189/cyborg/api/terminal/TerminalThread.java
@@ -29,7 +29,7 @@
private ConsoleReader reader;
private TerminalUser user;
private CommandSource source;
- private CommandManager commandManager = Cyborg.getInstance().getCommandManager();
+ private CommandManager commandManager = null;
@Override
public void start() {
try {
@@ -48,6 +48,8 @@ public void run() {
String line;
while (!isInterrupted() && ((line = reader.readLine()) != null)) {
if (!line.isEmpty()) {
+ if (commandManager == null)
+ commandManager = Cyborg.getInstance().getCommandManager();
commandManager.execute(source, line);
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.