From 973968afce1b010f4cbcd3def3e6d56c70e10188 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sat, 30 Jan 2010 00:50:36 +0000 Subject: [PATCH] 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 --- src/insets/InsetInclude.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index aa1c00fd80..f2304557b5 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -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. -- 2.39.2