From: Abdelrazak Younes Date: Fri, 13 Oct 2006 19:45:10 +0000 (+0000) Subject: ensure that Application is properly destroyed after at the end of LyX::priv_exec() X-Git-Tag: 1.6.10~12390 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=a897cda71cc6ae7f4354036b24ddc50a91ad6ca1;p=features.git ensure that Application is properly destroyed after at the end of LyX::priv_exec() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15326 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/lyx_main.C b/src/lyx_main.C index 9da0098cbf..f1eb442606 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -264,7 +264,12 @@ int LyX::priv_exec(int & argc, char * argv[]) theApp = 0; } - return exec2(argc, argv); + int exit_status = exec2(argc, argv); + + if (lyx::use_gui) + application_.reset(); + + return exit_status; }