LoopFactory: fix bug that occurs when sendWord(null) is called
[fleet.git] / 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()); }