NullPointerException fix

This commit is contained in:
Zzooouhh 2017-12-23 19:42:02 +01:00 committed by GitHub
parent 3df4af2104
commit 3a6974c0b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -489,7 +489,9 @@ public class ComputerPlayer6 extends ComputerPlayer /*implements Player*/ {
maxSeconds = 3600; maxSeconds = 3600;
} }
logger.debug("maxThink: " + maxSeconds + " seconds "); logger.debug("maxThink: " + maxSeconds + " seconds ");
if (task.get(maxSeconds, TimeUnit.SECONDS) != null) {
return task.get(maxSeconds, TimeUnit.SECONDS); return task.get(maxSeconds, TimeUnit.SECONDS);
}
} catch (TimeoutException e) { } catch (TimeoutException e) {
logger.info("simulating - timed out"); logger.info("simulating - timed out");
task.cancel(true); task.cancel(true);