* LyXView.cpp (reloadBuffer):

- adjust r31511 to prevent null pointer.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@31512 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-10-04 14:33:05 +00:00
parent 68141ce03c
commit 89bf8d2c8a

View File

@ -1855,11 +1855,11 @@ void LyXFunc::reloadBuffer()
Buffer * buf = lyx_view_->loadDocument(filename); Buffer * buf = lyx_view_->loadDocument(filename);
docstring const disp_fn = makeDisplayPath(filename.absFilename()); docstring const disp_fn = makeDisplayPath(filename.absFilename());
docstring str; docstring str;
// re-allocate master if necessary
if (is_child && theBufferList().isLoaded(master)
&& buf->masterBuffer() != master)
buf->setParent(master);
if (buf) { if (buf) {
// re-allocate master if necessary
if (is_child && theBufferList().isLoaded(master)
&& buf->masterBuffer() != master)
buf->setParent(master);
updateLabels(*buf); updateLabels(*buf);
lyx_view_->setBuffer(buf); lyx_view_->setBuffer(buf);
buf->errors("Parse"); buf->errors("Parse");