Fixed a bug in GUIAm2901
[Mograsim.git] / net.mograsim.logic.ui / src / net / mograsim / logic / ui / model / components / GUIComponent.java
index c19b800..22f1fbf 100644 (file)
@@ -89,7 +89,10 @@ public abstract class GUIComponent
 
        public Pin getPin(String name)
        {
-               return pinsByName.get(name);
+               Pin pin = pinsByName.get(name);
+               if (pin == null)
+                       throw new IllegalArgumentException("No pin with the name " + name);
+               return pin;
        }
 
        // @formatter:off