JAL-3619 fix up warning message and minimal patch to make sure failed-to-launch viewe...
[jalview.git] / src / jalview / gui / PymolViewer.java
index d426051..3b6ea99 100644 (file)
@@ -211,6 +211,8 @@ public class PymolViewer extends StructureViewerBase
         } catch (Exception ex)
         {
           Console.error("Couldn't open PyMOL viewer!", ex);
+          // if we couldn't open Pymol, no point continuing
+          return;
         }
       }
       int num = -1;
@@ -314,6 +316,7 @@ public class PymolViewer extends StructureViewerBase
                       getViewerName()),
               MessageManager.getString("label.error_loading_file"),
               JvOptionPane.ERROR_MESSAGE);
+      binding.closeViewer(true);
       this.dispose();
       return;
     }