diff -r 9b0eb87ded94 projectui/src/org/netbeans/modules/project/ui/ProjectsRootNode.java --- a/projectui/src/org/netbeans/modules/project/ui/ProjectsRootNode.java Sat Sep 03 06:38:29 2016 +0000 +++ b/projectui/src/org/netbeans/modules/project/ui/ProjectsRootNode.java Mon Sep 05 14:45:44 2016 +0300 @@ -341,9 +341,9 @@ if (type == PHYSICAL_VIEW) { final Sources sources = p.data.second().first(); - final SourceGroup[] groups = p.data.second().second(); sources.removeChangeListener( this ); sources.addChangeListener( this ); + final SourceGroup[] groups = p.data.second().second(); sources2projects.put( sources, new WeakReference( project ) ); final List nodes = new ArrayList<>(groups.length); for (SourceGroup group : groups) {