{
final PAEContactMatrix cm = (PAEContactMatrix) av
.getContactMatrix(aa[selectedRow]);
- if (cm.getNewick()!=null && cm.getNewick().length()>0)
+ if (cm!=null && cm.getNewick()!=null && cm.getNewick().length()>0)
{
item = new JMenuItem("Show Tree for Matrix");
item.addActionListener(new ActionListener()