diff options
author | John Kessenich <cepheus@frii.com> | 2016-11-27 17:32:19 -0700 |
---|---|---|
committer | John Kessenich <cepheus@frii.com> | 2016-11-27 17:32:19 -0700 |
commit | 1c98904014a258e446b5dc0edd26607a7085c17b (patch) | |
tree | d2f4084f3f1ca44ae2f64c4901e704fff1540b6e | |
parent | 5307eb2d1b0227f54237154a58c0fc61cad8e80c (diff) | |
download | glslang-1c98904014a258e446b5dc0edd26607a7085c17b.tar.gz |
Fix crash by returning early from finalCheck() if there is no tree to process.
-rw-r--r-- | glslang/Include/revision.h | 2 | ||||
-rw-r--r-- | glslang/MachineIndependent/linkValidate.cpp | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index 21df38d8..66fec1a3 100644 --- a/glslang/Include/revision.h +++ b/glslang/Include/revision.h @@ -2,5 +2,5 @@ // For the version, it uses the latest git tag followed by the number of commits. // For the date, it uses the current date (when then script is run). -#define GLSLANG_REVISION "Overload400-PrecQual.1663" +#define GLSLANG_REVISION "Overload400-PrecQual.1664" #define GLSLANG_DATE "27-Nov-2016" diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp index bc473abc..050fdae0 100644 --- a/glslang/MachineIndependent/linkValidate.cpp +++ b/glslang/MachineIndependent/linkValidate.cpp @@ -377,6 +377,9 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy // void TIntermediate::finalCheck(TInfoSink& infoSink) { + if (getTreeRoot() == nullptr) + return; + if (numEntryPoints < 1) { if (source == EShSourceGlsl) error(infoSink, "Missing entry point: Each stage requires one entry point"); |