Author: cotto
Date: Sun Dec 14 02:35:51 2008
New Revision: 33877
Modified:
trunk/compilers/imcc/optimizer.c
Log:
[imcc] be a little more defensive in NULL checks (CID #336)
Modified: trunk/compilers/imcc/optimizer.c
==============================================================================
--- trunk/compilers/imcc/optimizer.c (original)
+++ trunk/compilers/imcc/optimizer.c Sun Dec 14 02:35:51 2008
@@ -1511,7 +1511,7 @@
/* Unreachable instructions */
- for (last = unit->instructions, ins=last->next;
+ for (last = unit->instructions, last && (ins = last->next);
last && ins;
ins = ins->next) {
if ((last->type & IF_goto) && !(ins->type & ITLABEL) &&