LoopFactory: fix bug that occurs when sendWord(null) is called
authorAdam Megacz <adam@megacz.com>
Mon, 27 Jul 2009 03:21:26 +0000 (20:21 -0700)
committerAdam Megacz <adam@megacz.com>
Mon, 27 Jul 2009 03:21:26 +0000 (20:21 -0700)
src/edu/berkeley/fleet/loops/LoopFactory.java

index 5bdfc2a..1e79135 100644 (file)
@@ -224,7 +224,7 @@ public class LoopFactory {
     public void sendWord(Destination dest, BitVector signal) {
         if (!dock.isOutputDock()) throw new RuntimeException("sendWord() may only be used at output docks");
         if (pending_sendToken) flush_pending();
-        pending_path = dock.getPath(dest, signal);
+        pending_path = dest==null ? null : dock.getPath(dest, signal);
         flush_pending(true);
     }
     public void sendWord(Dock dock) { sendWord(dock.getDataDestination()); }