From: andy Date: Mon, 18 Apr 2005 20:43:29 +0000 (+0000) Subject: Fix crash in the code generator when compiling a (now illegal, because X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8ea41af5c4fa10bd0285d1612b7a693c78344132;p=simgear.git Fix crash in the code generator when compiling a (now illegal, because "var" is a reserved word) expresssion of the vorm "var=". --- diff --git a/simgear/nasal/codegen.c b/simgear/nasal/codegen.c index c909c928..9451b533 100644 --- a/simgear/nasal/codegen.c +++ b/simgear/nasal/codegen.c @@ -155,7 +155,7 @@ static int genLValue(struct Parser* p, struct Token* t) genExpr(p, LEFT(t)); genExpr(p, RIGHT(t)); return OP_INSERT; - } else if(t->type == TOK_VAR && RIGHT(t)->type == TOK_SYMBOL) { + } else if(t->type == TOK_VAR && RIGHT(t) && RIGHT(t)->type == TOK_SYMBOL) { genScalarConstant(p, RIGHT(t)); return OP_SETLOCAL; } else {