Skip to content

Commit

Permalink
[FIX JENKINS-13824] prevent NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeloof committed May 18, 2012
1 parent 7be3d2d commit 6093924
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/main/java/hudson/model/Run.java
Expand Up @@ -1400,8 +1400,12 @@ protected final void run(Runner job) {

try {
try {
Charset charset = Computer.currentComputer().getDefaultCharset();
this.charset = charset.name();
Computer computer = Computer.currentComputer();
Charset charset = null;
if (computer != null) {
charset = computer.getDefaultCharset();
this.charset = charset.name();
}

// don't do buffering so that what's written to the listener
// gets reflected to the file immediately, which can then be
Expand Down

0 comments on commit 6093924

Please sign in to comment.