mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 03:03:06 +00:00
Fix crash on Mac
Part 1: don't dereference untested pointers git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16108 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
12f83da64f
commit
5eccf6ebc0
@ -450,12 +450,13 @@ void LyX::quit()
|
|||||||
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
|
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
|
||||||
|
|
||||||
prepareExit();
|
prepareExit();
|
||||||
|
|
||||||
if (use_gui) {
|
if (use_gui) {
|
||||||
pimpl_->session_->writeFile();
|
if (pimpl_->session_)
|
||||||
|
pimpl_->session_->writeFile();
|
||||||
pimpl_->lyx_server_.reset();
|
pimpl_->lyx_server_.reset();
|
||||||
pimpl_->lyx_socket_.reset();
|
pimpl_->lyx_socket_.reset();
|
||||||
pimpl_->application_->exit(0);
|
if (pimpl_->application_)
|
||||||
|
pimpl_->application_->exit(0);
|
||||||
theApp = 0;
|
theApp = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -930,7 +931,8 @@ void LyX::emergencyCleanup() const
|
|||||||
|
|
||||||
pimpl_->buffer_list_.emergencyWriteAll();
|
pimpl_->buffer_list_.emergencyWriteAll();
|
||||||
if (use_gui) {
|
if (use_gui) {
|
||||||
pimpl_->lyx_server_->emergencyCleanup();
|
if (pimpl_->lyx_server_)
|
||||||
|
pimpl_->lyx_server_->emergencyCleanup();
|
||||||
pimpl_->lyx_server_.reset();
|
pimpl_->lyx_server_.reset();
|
||||||
pimpl_->lyx_socket_.reset();
|
pimpl_->lyx_socket_.reset();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user