]> git.lyx.org Git - features.git/blobdiff - src/LyX.cpp
Exit with error if required filename is not given
[features.git] / src / LyX.cpp
index 2096be7a771d28256a275cea6bd272551c1e5929..55fb0711ad71f4ae4517edc6405dba86f3f24c51 100644 (file)
@@ -468,6 +468,11 @@ int LyX::init(int & argc, char * argv[])
        for (int argi = 1; argi < argc; ++argi)
                pimpl_->files_to_load_.push_back(os::utf8_argv(argi));
 
+       if (!use_gui && pimpl_->files_to_load_.empty()) {
+               lyxerr << to_utf8(_("Missing filename for this operation.")) << endl;
+               return EXIT_FAILURE;
+       }
+
        if (first_start) {
                pimpl_->files_to_load_.push_back(
                        i18nLibFileSearch("examples", "splash.lyx").absFileName());