Bugs:
[repair.git] / Repair / RepairCompiler / MCC / IR / DotExpr.java
index 505459f6846caae342d7caf5d34de0a8549beca5..62fbe050580f1094de3bead0d7e31366ba704ba8 100755 (executable)
@@ -250,12 +250,16 @@ public class DotExpr extends Expr {
                } else if (DOTYPECHECKS) {
                    writer.outputline("bool "+typevar.getSafeSymbol()+"=assertvalidtype(" + dest.getSafeSymbol() + ", " + this.td.getId() + ");");
                }
-               writer.outputline("if (!"+typevar.getSafeSymbol()+")");
-               writer.startblock();
-               writer.outputline(dest.getSafeSymbol()+"=0;");
-               if (DONULL)
-                   writer.outputline(ptr + "(" + leftd.getSafeSymbol() + " + " + offset.getSafeSymbol() + ")=0;");
-               writer.endblock();
+
+               if (DOTYPECHECKS||DOMEMCHECKS) {
+                   writer.outputline("if (!"+typevar.getSafeSymbol()+")");
+                   writer.startblock();
+                   writer.outputline(dest.getSafeSymbol()+"=0;");
+                   if (DONULL)
+                       writer.outputline(ptr + "(" + leftd.getSafeSymbol() + " + " + offset.getSafeSymbol() + ")=0;");
+                   writer.endblock();
+               }
+
                writer.endblock();
            }
            writer.endblock();