From: <aki...@us...> - 2008-10-31 18:10:00
|
Revision: 5615 http://gridarta.svn.sourceforge.net/gridarta/?rev=5615&view=rev Author: akirschbaum Date: 2008-10-31 18:09:49 +0000 (Fri, 31 Oct 2008) Log Message: ----------- Do not crash when validating unsaved maps containing exits. Modified Paths: -------------- trunk/crossfire/ChangeLog trunk/daimonin/ChangeLog trunk/src/app/net/sf/gridarta/map/validation/checks/ExitChecker.java Modified: trunk/crossfire/ChangeLog =================================================================== --- trunk/crossfire/ChangeLog 2008-10-31 18:03:17 UTC (rev 5614) +++ trunk/crossfire/ChangeLog 2008-10-31 18:09:49 UTC (rev 5615) @@ -1,5 +1,7 @@ 2008-10-31 Andreas Kirschbaum + * Do not crash when validating unsaved maps containing exits. + * Fix spells combobox in game object attributes dialog. 2008-10-28 Andreas Kirschbaum Modified: trunk/daimonin/ChangeLog =================================================================== --- trunk/daimonin/ChangeLog 2008-10-31 18:03:17 UTC (rev 5614) +++ trunk/daimonin/ChangeLog 2008-10-31 18:09:49 UTC (rev 5615) @@ -1,3 +1,7 @@ +2008-10-31 Andreas Kirschbaum + + * Do not crash when validating unsaved maps containing exits. + 2008-10-28 Andreas Kirschbaum * Load correct animtree and facetree files in "collected" mode. Modified: trunk/src/app/net/sf/gridarta/map/validation/checks/ExitChecker.java =================================================================== --- trunk/src/app/net/sf/gridarta/map/validation/checks/ExitChecker.java 2008-10-31 18:03:17 UTC (rev 5614) +++ trunk/src/app/net/sf/gridarta/map/validation/checks/ExitChecker.java 2008-10-31 18:09:49 UTC (rev 5615) @@ -70,7 +70,12 @@ newfile = new File(mapDirectory.getAbsolutePath(), path.substring(1)); } else { // we have a relative path: - newfile = new File(gameObject.getMapSquare().getMapModel().getMapControl().getMapFile().getParent(), path); + final File mapFile = gameObject.getMapSquare().getMapModel().getMapControl().getMapFile(); + if (mapFile == null) { + // unsaved map => do not check + return; + } + newfile = new File(mapFile.getParent(), path); } if (newfile.exists() && !newfile.isDirectory()) { return; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |