ParameterNode: deal gracefully with the case where the node has no peer
authorAdam Megacz <adam@megacz.com>
Sun, 30 Aug 2009 00:13:51 +0000 (17:13 -0700)
committerAdam Megacz <adam@megacz.com>
Sun, 30 Aug 2009 00:13:51 +0000 (17:13 -0700)
src/edu/berkeley/fleet/dataflow/ParameterNode.java

index 365a114..41057e3 100644 (file)
@@ -12,6 +12,7 @@ public class ParameterNode extends Node {
         set(ctx, new BitVector(ctx.fleet.getWordWidth()).set(l));
     }
     public void set(CodeBag ctx, BitVector bv) {
+        if (out==null || out.peer==null) return;
         ctx.sendWord(bv, ((DockInPort)out.peer).dock.getDataDestination());
     }