X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FCommands.java;h=7f493e0ff15fe9e21b683c4cdbc6942da9b4e2c4;hb=e7205ce1559cfce568839e1168ab522f0744adb6;hp=b9c04f56265eee0e3fcf8e37b3a4a684e5094f86;hpb=f754db87420bc03f4665bda29593aab07d186dcb;p=jalview.git diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index b9c04f5..7f493e0 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -569,9 +569,20 @@ public class Commands structureFilepath, tft, paeFilepath, false, ssFromStructure, false, viewerType); - if (headless) + if (sv==null) + { + Console.error("Failed to import and open structure view."); + continue; + } + while (sv.isBusy()) { - sv.setAsync(false); + try { + Thread.sleep(25); + } + catch (Exception x) + { + + } } String structureImageFilename = ArgParser.getValueFromSubValOrArg( @@ -629,8 +640,15 @@ public class Commands if (sview instanceof AppJmol) { AppJmol jmol = (AppJmol) sview; - jmol.makePDBImage(structureImageFile, imageType, renderer, + try { + jmol.makePDBImage(structureImageFile, imageType, renderer, userBis); + } + catch (ImageOutputException ioexc) + { + Console.warn("Unexpected error whilst exporting image to "+structureImageFile,ioexc); + } + } break; default: