java.lang.NullPointerException
at util.Util.drawStackDisplay(Util.java:846)
at gui.SpaceWindow.renderSpaceWindow(SpaceWindow.java:250)
Fixed by noting that saved coordinates are already in space, so conversion must not be done in CIW::restoreCurrentSelectedStack(). After this, if the city is switched while in in CIW, on exit we may get
Thread[AWT-EventQueue-0,6,main]
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.checkElementIndex(LinkedList.java:555)
at java.util.LinkedList.get(LinkedList.java:476)
at util.Util.drawStackDisplay(Util.java:850)
at gui.SpaceWindow.renderSpaceWindow(SpaceWindow.java:250)
at gui.SpaceWindow.paintComponent(SpaceWindow.java:239)
which is fixed by copying the relevant Point-objects instead of the references in CIW::saveCurrentSelectedStack()
Fixed by noting that saved coordinates are already in space, so conversion must not be done in CIW::restoreCurrentSelectedStack(). After this, if the city is switched while in in CIW, on exit we may get
which is fixed by copying the relevant Point-objects instead of the references in CIW::saveCurrentSelectedStack()