Fail compilation on empty source string

TRAC #11814 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@145 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 3c010c02
...@@ -303,6 +303,12 @@ int ShCompile( ...@@ -303,6 +303,12 @@ int ShCompile(
success = false; success = false;
if (debugOptions & EDebugOpIntermediate) if (debugOptions & EDebugOpIntermediate)
intermediate.outputTree(parseContext.treeRoot); intermediate.outputTree(parseContext.treeRoot);
} else if (!parseContext.treeRoot) {
parseContext.error(1, "Unexpected end of file.", "", "");
parseContext.infoSink.info << parseContext.numErrors << " compilation errors. No code generated.\n\n";
success = false;
if (debugOptions & EDebugOpIntermediate)
intermediate.outputTree(parseContext.treeRoot);
} }
intermediate.remove(parseContext.treeRoot); intermediate.remove(parseContext.treeRoot);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment