Fix crash by returning early from finalCheck() if there is no tree to process.

This commit is contained in:
John Kessenich 2016-11-27 17:32:19 -07:00
parent 5307eb2d1b
commit 1c98904014
2 changed files with 4 additions and 1 deletions

View File

@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // 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). // 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" #define GLSLANG_DATE "27-Nov-2016"

View File

@ -377,6 +377,9 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy
// //
void TIntermediate::finalCheck(TInfoSink& infoSink) void TIntermediate::finalCheck(TInfoSink& infoSink)
{ {
if (getTreeRoot() == nullptr)
return;
if (numEntryPoints < 1) { if (numEntryPoints < 1) {
if (source == EShSourceGlsl) if (source == EShSourceGlsl)
error(infoSink, "Missing entry point: Each stage requires one entry point"); error(infoSink, "Missing entry point: Each stage requires one entry point");