]> git.lyx.org Git - features.git/commitdiff
ensure that Application is properly destroyed after at the end of LyX::priv_exec()
authorAbdelrazak Younes <younes@lyx.org>
Fri, 13 Oct 2006 19:45:10 +0000 (19:45 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 13 Oct 2006 19:45:10 +0000 (19:45 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15326 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyx_main.C

index 9da0098cbf0102f35afe3cfc1037eb4126dc5381..f1eb44260610411e3c0ffa3378c882c42cc751e5 100644 (file)
@@ -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;
 }