* GuiView.cpp (reloadBuffer):

- adjust r31510 to prevent null pointer.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31513 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2009-10-04 14:35:12 +00:00
parent 42b2fa2acf
commit 73a4394e97

View File

@ -2253,11 +2253,11 @@ void GuiView::reloadBuffer()
buf = loadDocument(filename); buf = 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);
buf->updateLabels(); buf->updateLabels();
setBuffer(buf); setBuffer(buf);
buf->errors("Parse"); buf->errors("Parse");