somewhat managed to misunderstand the logic. should be ok now, sorry.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7313 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Alfredo Braunstein 2003-07-18 07:51:21 +00:00
parent 99b64f351e
commit 54b1bb8637
2 changed files with 12 additions and 10 deletions

View File

@ -9,6 +9,10 @@
* text3.C: two-phase drawing for InsetText and InsetTabular
some float -> int changes.
2003-07-18 Alfredo Braunstein <abraunst@libero.it>
* lyx_main.C: fix the fix
2003-07-18 Alfredo Braunstein <abraunst@libero.it>
* lyx_main.C: fix a crash in batch mode if no files specified

View File

@ -167,17 +167,15 @@ LyX::LyX(int & argc, char * argv[])
}
}
bool success = false;
// try to dispatch to last loaded buffer first
if (last_loaded)
last_loaded->dispatch(batch_command, &success);
else
lyxerr << _("Batch command specified but no "
"file loaded. Exiting.") << endl;
QuitLyX();
exit(!success);
if (last_loaded) {
bool success = false;
if (last_loaded->dispatch(batch_command, &success)) {
QuitLyX();
exit(!success);
}
}
files.clear(); // the files are already loaded
}
lyx_gui::start(batch_command, files);