From: Richard Heck Date: Thu, 17 Nov 2011 18:26:42 +0000 (+0000) Subject: Make sure we aren't trying to reuse the global variable, and make X-Git-Tag: 2.1.0beta1~2356 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=eecb001e95bcfce2cb2f5b3d34d2fecba963b942;p=features.git Make sure we aren't trying to reuse the global variable, and make sure we aren't leaking any cloned buffers. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40208 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 6f2303e609..da64676d7b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -458,8 +458,11 @@ Buffer * Buffer::clone() const LASSERT(bit != bufmap.end(), return 0); Buffer * cloned_buffer = bit->second; + // this should be empty. if not, then either we have left + // some buffer undeleted, or else we are trying to export + // two buffers at once. either way is a problem. + LASSERT(cloned_buffer_list.empty(), return 0); // record the list of cloned buffers in the cloned master - cloned_buffer_list.clear(); BufferMap::iterator it = bufmap.begin(); BufferMap::iterator en = bufmap.end(); for (; it != en; ++it)