]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_main.C
reduce number of calls to LyXText::getFont
[lyx.git] / src / lyx_main.C
index 73cf44c403dcc76246a78b1c90461f192d1f27f3..01c2aaafff58b157ec452e239b805740f870af86 100644 (file)
@@ -278,7 +278,13 @@ void LyX::priv_exec(int & argc, char * argv[])
                files.clear(); // the files are already loaded
        }
 
-       lyx_gui::start(batch_command, files);
+       if (want_gui)
+               lyx_gui::start(batch_command, files);
+       else {
+               // Something went wrong above
+               QuitLyX();
+               exit(EXIT_FAILURE);
+       }
 }
 
 
@@ -879,9 +885,6 @@ int parse_execute(string const & arg, string const &)
                exit(1);
        }
        batch = arg;
-       // Argh. Setting gui to false segfaults..
-       // FIXME: when ? how ?
-       // is_gui = false;
        return 1;
 }