Commit 6ea3d105 authored by chrisryancombs's avatar chrisryancombs
Browse files

Fixed issue with apps core dumping when ISISROOT not set. Fixes #5360.

parent 9a854dbc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -103,11 +103,13 @@ namespace Isis {
    putenv(env);

    // Verify ISISROOT was set
    // Note: as printing and logging IExceptions requires ISISROOT to be set (for preferences),
    //       The case below cannot be handled with IExceptions
    if (getenv("ISISROOT") == NULL || QString(getenv("ISISROOT")) == "") {
      QString message = "Please set ISISROOT before running any Isis "
          "applications";
      cerr << message << endl;
      abort();
      exit(1);
    }

    // Get the starting cpu time, direct I/Os, page faults, and swaps
+5 −3
Original line number Diff line number Diff line
@@ -120,12 +120,14 @@ int main(int argc, char *argv[]) {
  Isis::Application::p_applicationForceGuiApp = true;
#endif
  
  // ISISROOT not set is handled in Application initialization, needs to be before qtpluginpath
  Isis::Application *app = new Isis::Application(argc, argv);
  app->RegisterGuiHelpers(GuiHelpers());
  
  // Add the plugin directory so QT looks at the Isis plugin dir
  Isis::FileName qtpluginpath("$ISISROOT/3rdParty/plugins");
  QCoreApplication::addLibraryPath(qtpluginpath.expanded());

  Isis::Application *app = new Isis::Application(argc, argv);
  app->RegisterGuiHelpers(GuiHelpers());
  int status = app->Run(APPLICATION);
  delete app;
  delete QCoreApplication::instance();