Skip to content

Commit

Permalink
Avoid possible NPE, #172
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Sep 18, 2017
1 parent 11eb592 commit 4ed7081
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public String toAnsi(Terminal terminal) {
if (max_colors != null) {
colors = max_colors;
}
windows = terminal.getType().toLowerCase(Locale.ENGLISH)
windows = terminal.getType() != null
&& terminal.getType().toLowerCase(Locale.ENGLISH)
.startsWith(AbstractWindowsTerminal.TYPE_WINDOWS);
}
for (int i = 0; i < length(); i++) {
Expand Down

0 comments on commit 4ed7081

Please sign in to comment.