diff --git a/core/src/main/java/hudson/slaves/ComputerRetentionWork.java b/core/src/main/java/hudson/slaves/ComputerRetentionWork.java index 50cb6858f0..25c3805a4f 100644 --- a/core/src/main/java/hudson/slaves/ComputerRetentionWork.java +++ b/core/src/main/java/hudson/slaves/ComputerRetentionWork.java @@ -28,6 +28,7 @@ import java.util.WeakHashMap; import hudson.model.Computer; import hudson.model.Hudson; +import hudson.model.Node; import hudson.model.PeriodicWork; import hudson.Extension; @@ -56,7 +57,8 @@ public class ComputerRetentionWork extends PeriodicWork { protected void doRun() { final long startRun = System.currentTimeMillis(); for (Computer c : Hudson.getInstance().getComputers()) { - if (c.getNode().isHoldOffLaunchUntilSave()) + Node n = c.getNode(); + if (n!=null && n.isHoldOffLaunchUntilSave()) continue; if (!nextCheck.containsKey(c) || startRun > nextCheck.get(c)) { // at the moment I don't trust strategies to wait more than 60 minutes