]> git.sur5r.net Git - cc65/commitdiff
Fixed an error: An .ELSE without an .IF caused a null pointer dereference.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 9 Jun 2011 11:27:33 +0000 (11:27 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 9 Jun 2011 11:27:33 +0000 (11:27 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@5047 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/condasm.c

index c15b81e98fe2ed8e754066a43d624c5dc4594567..49ad252fba25c9de28c1f3e564e6712ec2ab1cce 100644 (file)
@@ -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 ();