Skip to content

Commit 33a3194

Browse files
committed
Fix NullPointerException in LoggerPreprocessor
This handles the case of loggerName being null when running scripts that contain a Logger parameter.
1 parent 328b936 commit 33a3194

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/scijava/module/process/LoggerPreprocessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public void process(final Module module) {
6666
if (loggerInput == null || !loggerInput.isAutoFill()) return;
6767

6868
String loggerName = loggerInput.getLabel();
69-
if(loggerName.isEmpty())
69+
if(loggerName == null || loggerName.isEmpty())
7070
loggerName = module.getDelegateObject().getClass().getSimpleName();
7171
Logger logger = logService.subLogger(loggerName);
7272

0 commit comments

Comments
 (0)