From ee6fcfd1dde7456fba4e76ad2c2fbe5d793f196d Mon Sep 17 00:00:00 2001 From: John Levon Date: Mon, 1 Dec 2003 00:35:26 +0000 Subject: [PATCH] fix a crash on exit since nobody objected git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8164 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView_pimpl.C | 7 ++++--- src/ChangeLog | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index c499fbf572..d3d9eb7c99 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -293,9 +293,6 @@ void BufferView::Pimpl::buffer(Buffer * b) // set current buffer buffer_ = b; - buffer_->text().init(bv_); - buffer_->text().textwidth_ = workarea().workWidth(); - buffer_->text().fullRebreak(); top_y_ = 0; @@ -311,6 +308,10 @@ void BufferView::Pimpl::buffer(Buffer * b) lyxerr[Debug::INFO] << "Buffer addr: " << buffer_ << endl; connectBuffer(*buffer_); + buffer_->text().init(bv_); + buffer_->text().textwidth_ = workarea().workWidth(); + buffer_->text().fullRebreak(); + // If we don't have a text object for this, we make one if (bv_->text() == 0) resizeCurrentBuffer(); diff --git a/src/ChangeLog b/src/ChangeLog index 2ef05297ab..102ddac1f3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-12-01 John Levon + + * BufferView_pimpl.C: fix a crash on exit with + a buffer open + 2003-11-30 Martin Vermeer * BranchList.C: fix setSelected() method.