Index: lams_central/src/java/org/lamsfoundation/lams/authoring/service/AuthoringService.java =================================================================== diff -u -r11914f2354254e0e92e2a271453ba2f0e8a35fdc -rea47b309c5bfe3d550ed87210e2d1e4522ce4ec2 --- lams_central/src/java/org/lamsfoundation/lams/authoring/service/AuthoringService.java (.../AuthoringService.java) (revision 11914f2354254e0e92e2a271453ba2f0e8a35fdc) +++ lams_central/src/java/org/lamsfoundation/lams/authoring/service/AuthoringService.java (.../AuthoringService.java) (revision ea47b309c5bfe3d550ed87210e2d1e4522ce4ec2) @@ -782,12 +782,14 @@ } // Now go back and fix any branch mapping entries - they will still be pointing to old activities. + // Need to check if the sets are not null as these are new objects and Hibernate may not have + // backed them with collections yet. for ( Grouping grouping: newGroupings.values() ) { - if ( grouping.getGroups().size() > 0 ) { + if ( grouping.getGroups() !=null && grouping.getGroups().size() > 0 ) { Iterator iter = grouping.getGroups().iterator(); while ( iter.hasNext() ) { Group group = (Group) iter.next(); - if ( group.getBranchActivities().size() > 0 ) { + if ( group.getBranchActivities() != null && group.getBranchActivities().size() > 0 ) { Iterator iter2 = group.getBranchActivities().iterator(); while ( iter2.hasNext() ) { GroupBranchActivityEntry entry = (GroupBranchActivityEntry) iter2.next();