Fix a crash when the child document is already closed.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33266 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-01-30 00:50:36 +00:00
parent 8c5626cf13
commit 973968afce

View File

@ -405,7 +405,8 @@ Buffer * InsetInclude::loadIfNeeded() const
{
// This is for background export and preview. We don't want to load the
// cloned child document again.
if (child_buffer_ && child_buffer_->isClone())
if (child_buffer_ && theBufferList().isLoaded(child_buffer_)
&& child_buffer_->isClone())
return child_buffer_;
// Don't try to load it again if we failed before.