From: uz Date: Thu, 9 Jun 2011 11:27:33 +0000 (+0000) Subject: Fixed an error: An .ELSE without an .IF caused a null pointer dereference. X-Git-Tag: V2.13.3~414 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ce0d51d55ac0602abcf40bcdb7f2439638f16c3b;p=cc65 Fixed an error: An .ELSE without an .IF caused a null pointer dereference. git-svn-id: svn://svn.cc65.org/cc65/trunk@5047 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/condasm.c b/src/ca65/condasm.c index c15b81e98..49ad252fb 100644 --- a/src/ca65/condasm.c +++ b/src/ca65/condasm.c @@ -227,8 +227,10 @@ void DoConditionals (void) ElseClause (D, ".ELSE"); /* Remember the data for the .ELSE */ - GetFullLineInfo (&D->LineInfos, 0); - D->Name = ".ELSE"; + if (D) { + GetFullLineInfo (&D->LineInfos, 0); + D->Name = ".ELSE"; + } /* Calculate the new overall condition */ CalcOverallIfCond ();