From: Erik V. <eri...@xs...> - 2012-05-08 10:06:50
|
Absent any further comments, I have now committed and pushed this fix into master. Erik. > -----Original Message----- > From: Erik Vos [mailto:eri...@xs...] > Sent: Thursday, May 03, 2012 5:14 PM > To: 'Development list for Rails: an 18xx game' > Subject: Re: [Rails-devel] Bug Report 1830 Rails1.7.2 > > Stefan, below I'm returning one sub-issue back to you... > > 5. Click "done". > > And indeed an exception appears on the console: > Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException > at > rails.ui.swing.MapPanel.scrollPaneShowRectangle(MapPanel.java:113) > at > rails.ui.swing.ORUIManager.setMapRelatedActions(ORUIManager.java:238) > at > rails.ui.swing.ORUIManager.updateStatus(ORUIManager.java:1677) > at > rails.ui.swing.ORUIManager.updateStatus(ORUIManager.java:1520) > at > rails.ui.swing.GameUIManager.updateUI(GameUIManager.java:562) > at > rails.ui.swing.GameUIManager.processAction(GameUIManager.java:329) > at rails.ui.swing.ORWindow.process(ORWindow.java:229) > at > rails.ui.swing.ORUIManager.processAction(ORUIManager.java:434) > at rails.ui.swing.ORPanel.actionPerformed(ORPanel.java:912) > > ORUIManager line 238 has: > > mapPanel.scrollPaneShowRectangle( > NetworkVertex.getVertexMapCoverage(map, > companyGraph.vertexSet())); > > and the rectangle passed is null, which causes the exception. > As a quick fix I'm now checking the rectangle in > MapPanel.scrollPaneShowRectangle, and do nothing if it is null. > This fixes the immediate problem. > > I don't know if NetworkVertex.getVertexMapCoverage() returning a null > rectangle should be considered a bug. I must leave that to Stefan. > |