Skip to content

Commit

Permalink
Fix potential nullpo
Browse files Browse the repository at this point in the history
  • Loading branch information
ME1312 committed Dec 1, 2021
1 parent 508c2f7 commit 7d9f4f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -132,6 +132,7 @@ private void log(String line) {
}
}

// Log to FILTER
log(level, msg);

// Log to FILE
Expand Down
Expand Up @@ -141,7 +141,6 @@ public void start() {
}
}
Process process = this.process;
if (level == null) level = logger.info;
if (out == null) (out = new Thread(() -> start(process.getInputStream(), false), SubAPI.getInstance().getAppInfo().getName() + "::Log_Spooler(" + name + ')')).start();
if (err == null) (err = new Thread(() -> start(process.getErrorStream(), true), SubAPI.getInstance().getAppInfo().getName() + "::Error_Spooler(" + name + ')')).start();
}
Expand Down Expand Up @@ -207,6 +206,8 @@ private void log(String line) {
default:
level = logger.info;
}
} else if (level == null) {
level = logger.info;
}

// Log to FILTER
Expand Down

0 comments on commit 7d9f4f8

Please sign in to comment.