rm potential null ptr deref (Coverity)

This commit is contained in:
Terence Parr 2013-08-31 16:20:34 -07:00
parent d4f2abc5e3
commit 0ac47437bc
1 changed files with 2 additions and 4 deletions

View File

@ -385,10 +385,8 @@ public class Tool {
}
public void processNonCombinedGrammar(Grammar g, boolean gencode) {
if ( g.ast!=null && internalOption_PrintGrammarTree ) System.out.println(g.ast.toStringTree());
//g.ast.inspect();
if ( g.ast.hasErrors ) return;
if ( g.ast==null || g.ast.hasErrors ) return;
if ( internalOption_PrintGrammarTree ) System.out.println(g.ast.toStringTree());
boolean ruleFail = checkForRuleIssues(g);
if ( ruleFail ) return;