From: <th...@us...> - 2010-05-26 23:02:13
|
Revision: 11975 http://pcgen.svn.sourceforge.net/pcgen/?rev=11975&view=rev Author: thpr Date: 2010-05-26 23:02:06 +0000 (Wed, 26 May 2010) Log Message: ----------- Restore of saved PC with no languages causes crash Issue#: CODE-58 Modified Paths: -------------- Trunk/pcgen/code/src/java/pcgen/io/PCGVer2Parser.java Modified: Trunk/pcgen/code/src/java/pcgen/io/PCGVer2Parser.java =================================================================== --- Trunk/pcgen/code/src/java/pcgen/io/PCGVer2Parser.java 2010-05-26 06:24:12 UTC (rev 11974) +++ Trunk/pcgen/code/src/java/pcgen/io/PCGVer2Parser.java 2010-05-26 23:02:06 UTC (rev 11975) @@ -2553,17 +2553,21 @@ warnings.add(msg); } } - else if ((ability.getSafe(ObjectKey.MULTIPLE_ALLOWED) && ability - .getSafe(ObjectKey.STACKS)) - || !thePC.containsAssociated(ability, appliedToKey)) + else if (appliedToKey.length() > 0) { - ChoiceManagerList<Object> controller = ChooserUtilities - .getConfiguredController(ability, thePC, category, - new ArrayList<String>()); - String[] assoc = appliedToKey.split(Constants.COMMA, -1); - for (String string : assoc) + if ((ability.getSafe(ObjectKey.MULTIPLE_ALLOWED) && ability + .getSafe(ObjectKey.STACKS)) + || !thePC.containsAssociated(ability, appliedToKey)) { - controller.restoreChoice(thePC, ability, string); + ChoiceManagerList<Object> controller = ChooserUtilities + .getConfiguredController(ability, thePC, + category, new ArrayList<String>()); + String[] assoc = appliedToKey + .split(Constants.COMMA, -1); + for (String string : assoc) + { + controller.restoreChoice(thePC, ability, string); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |