diff --git a/pmd/src/net/sourceforge/pmd/swingui/RulesTreeModel.java b/pmd/src/net/sourceforge/pmd/swingui/RulesTreeModel.java index 6a40e8c9b3..bf83608852 100644 --- a/pmd/src/net/sourceforge/pmd/swingui/RulesTreeModel.java +++ b/pmd/src/net/sourceforge/pmd/swingui/RulesTreeModel.java @@ -12,6 +12,7 @@ import net.sourceforge.pmd.swingui.event.RulesTreeModelEvent; import net.sourceforge.pmd.swingui.event.RulesTreeModelEventListener; import javax.swing.tree.DefaultTreeModel; +import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.Enumeration; @@ -169,6 +170,11 @@ class RulesTreeModel List ruleSetList = m_pmdDirectoryReturnedEventHandler.getRuleSetList(); + if (ruleSetList == null) + { + ruleSetList = new ArrayList(); + } + // // Sort the rule sets by name in ascending order. //