.setContents(new StringSelection(output), Desktop.instance);\r
\r
Vector hiddenColumns = null;\r
- if(viewport.hasHiddenColumns && viewport.getSelectionGroup()!=null)\r
+ if(viewport.hasHiddenColumns)\r
{\r
hiddenColumns =new Vector();\r
int hiddenOffset = viewport.getSelectionGroup().getStartRes();\r
AlignFrame af = new AlignFrame(alignment);\r
String newtitle = new String("Copied sequences");\r
\r
- if(Desktop.jalviewClipboard[2]!=null)\r
+ if(Desktop.jalviewClipboard!=null && Desktop.jalviewClipboard[2]!=null)\r
{\r
Vector hc = (Vector)Desktop.jalviewClipboard[2];\r
for(int i=0; i<hc.size(); i++)\r