Skip to content

Commit

Permalink
Fixes #555. Guard against null ptr
Browse files Browse the repository at this point in the history
Signed-off-by: Terence Parr <[email protected]>
  • Loading branch information
parrt committed May 21, 2022
1 parent bd2e599 commit 4fa1cc8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public void documentChanged(DocumentEvent event) {

public void grammarFileSaved() {
clearParseErrors();
if ( previewState.startRuleName!=null ) {
if ( previewState!=null && previewState.startRuleName!=null ) {
setStartRuleName(previewState.grammarFile, previewState.startRuleName);
}
else {
Expand Down

0 comments on commit 4fa1cc8

Please sign in to comment.