Skip to content

Commit

Permalink
Merge pull request #52 from technology16/npe_fix
Browse files Browse the repository at this point in the history
fixed NPE when counting processes
  • Loading branch information
Endeavourl authored Mar 25, 2020
2 parents f4d286b + 57b69b4 commit bd3b4d8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ public int getProcessesCount() {
}

private int countChildren(DBProcess process) {
if (process == null) {
return 0;
}
return process.getChildren().size() + process.getChildren().stream().mapToInt(this::countChildren).sum();
}

Expand Down

0 comments on commit bd3b4d8

Please sign in to comment.