aboutsummaryrefslogtreecommitdiff
path: root/lib/compile-handler.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2017-12-22 04:37:26 -0600
committerMatt Godbolt <matt@godbolt.org>2017-12-22 04:37:26 -0600
commitc18014eaf8982ee0a4c9b5bff14d67acbf46ad35 (patch)
treec6e1590ec7369fe2d4ff649689f4b335ab56c9a5 /lib/compile-handler.js
parenta47b5127b5577619ecfd5a1305015ceb33ff121c (diff)
downloadcompiler-explorer-c18014eaf8982ee0a4c9b5bff14d67acbf46ad35.tar.gz
compiler-explorer-c18014eaf8982ee0a4c9b5bff14d67acbf46ad35.zip
Avoid an error if the compiler fails to execute during version check
Diffstat (limited to 'lib/compile-handler.js')
-rw-r--r--lib/compile-handler.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/compile-handler.js b/lib/compile-handler.js
index 1cbde43f4..f2f567b0c 100644
--- a/lib/compile-handler.js
+++ b/lib/compile-handler.js
@@ -80,10 +80,11 @@ function CompileHandler(gccProps, compilerProps) {
logger.debug(compiler.id + " is unchanged");
return cached;
}
- return this.factories[type](compiler, this.compilerEnv).then(function (compiler) {
- compiler.mtime = res.mtime;
- return compiler;
- });
+ return this.factories[type](compiler, this.compilerEnv)
+ .then(function (compiler) {
+ if (compiler) compiler.mtime = res.mtime;
+ return compiler;
+ });
}, this))
.catch(function (err) {
logger.warn("Unable to stat compiler binary", err);