From 54b1bb863736afa0ce3335494a1b3c426a4ebb28 Mon Sep 17 00:00:00 2001 From: Alfredo Braunstein Date: Fri, 18 Jul 2003 07:51:21 +0000 Subject: [PATCH] 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 --- src/ChangeLog | 4 ++++ src/lyx_main.C | 18 ++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 70c92ad362..3cfa7a23fb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -9,6 +9,10 @@ * text3.C: two-phase drawing for InsetText and InsetTabular some float -> int changes. +2003-07-18 Alfredo Braunstein + + * lyx_main.C: fix the fix + 2003-07-18 Alfredo Braunstein * lyx_main.C: fix a crash in batch mode if no files specified diff --git a/src/lyx_main.C b/src/lyx_main.C index 2a6b9b84cc..b61fe85291 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -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);