summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@google.com>2019-01-30 17:26:26 -0800
committerYong He <yonghe@google.com>2019-01-30 17:27:08 -0800
commit04f1badc29d41e642597039f9822a6e3aa1138cc (patch)
tree16d9f82207976d16f6002355ca2589d41b73c0aa /source/slang/slang.cpp
parent4db0aba1edc5fd55b91457481bae119ef66dde89 (diff)
Fixes crashes at source error.
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 359848d65..e332ef588 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -912,6 +912,9 @@ RefPtr<ModuleDecl> CompileRequest::loadModule(
if( errorCountAfter != errorCountBefore )
{
mSink.diagnose(srcLoc, Diagnostics::errorInImportedModule);
+ }
+ if (errorCountAfter)
+ {
// Something went wrong during the parsing, so we should bail out.
return nullptr;
}