maptool
maptool copied to clipboard
[Bug]: Starting a new campaign while token move in progress produces NPE
Describe the Bug
If a token move is in progress when a new campaign is started produces a NPE.
java.lang.NullPointerException: Cannot invoke "net.rptools.maptool.model.Zone.putToken(net.rptools.maptool.model.Token)" because the return value of "net.rptools.maptool.model.Campaign.getZone(net.rptools.maptool.model.GUID)" is null
at net.rptools.maptool.client.ServerCommandClientImpl.putToken(ServerCommandClientImpl.java:173)
at net.rptools.maptool.client.ui.zone.ZoneRenderer.commitMoveSelectionSet(ZoneRenderer.java:522)
at net.rptools.maptool.client.tool.PointerTool.stopTokenDrag(PointerTool.java:251)
at net.rptools.maptool.client.ui.MapToolFrame.stopTokenDrag(MapToolFrame.java:1540)
at net.rptools.maptool.client.ui.MapToolFrame.setCurrentZoneRenderer(MapToolFrame.java:1566)
at net.rptools.maptool.client.AppActions$55.executeAction(AppActions.java:2023)
at net.rptools.maptool.client.AppActions$ClientAction.execute(AppActions.java:3456)
...
To Reproduce
- Start MT.
- Drop a token on map.
- Move token using cursor keys 1 or more times but don't terminate move.
- Select File -> New Campaign and select Yes to Discard current campaign prompt.
- See NPE.
Expected Behaviour
No error.
Screenshots
No response
MapTool Info
Current dev branch
Desktop
Windows 10
Additional Context
N/A