From d32701179ebfe26e290109aff6d7e5b58d943275 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Sun, 19 Nov 2006 11:10:04 +0000 Subject: [PATCH] check if theApp is valid git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15973 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/lyx_main.C | 1 + src/lyxsocket.C | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lyx_main.C b/src/lyx_main.C index aab3657842..02263f2d80 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -417,6 +417,7 @@ void LyX::quit() pimpl_->lyx_server_.reset(); pimpl_->lyx_socket_.reset(); pimpl_->application_->exit(0); + theApp = 0; } } diff --git a/src/lyxsocket.C b/src/lyxsocket.C index 0de9476764..086a00e69d 100644 --- a/src/lyxsocket.C +++ b/src/lyxsocket.C @@ -77,6 +77,7 @@ LyXServerSocket::LyXServerSocket(LyXFunc * f, string const & addr) LyXServerSocket::~LyXServerSocket() { if (fd_ != -1) { + BOOST_ASSERT (theApp); theApp->unregisterSocketCallback(fd_); if (::close(fd_) != 0) lyxerr << "lyx: Server socket " << fd_ -- 2.39.5