Fix Mac crash on exit.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15954 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2006-11-17 15:24:26 +00:00
parent 1c3755244f
commit 146631a5c7
2 changed files with 14 additions and 0 deletions

View File

@ -159,6 +159,17 @@ struct LyX::Singletons
boost::scoped_ptr<LyX> LyX::singleton_;
LyX::~LyX()
{
// Static data are not treated in the same way at all on the Mac (and
// the LyX singleton has static methods). This is the reason why the
// exit command on the Mac bypasses our dispatch machinery altogether.
// On Linux and Windows we won't pass a second time through quit()
// because quitting will already be set to true.
if (!quitting)
quit();
}
int LyX::exec(int & argc, char * argv[])
{

View File

@ -40,6 +40,9 @@ namespace frontend { class Application; }
/// initial startup
class LyX : boost::noncopyable {
public:
~LyX();
/**
* Execute LyX. The startup sequence is as follows:
* -# LyX::exec()