From: Richard Heck Date: Fri, 3 Apr 2009 16:04:45 +0000 (+0000) Subject: Add a comment. X-Git-Tag: 2.0.0~6959 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=46c5596462005c0a59aa4e8cde5211d8eb282845;p=features.git Add a comment. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29056 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Buffer.cpp b/src/Buffer.cpp index e0998f8330..888f820728 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -228,6 +228,9 @@ public: /// This is here to force the test to be done whenever parent_buffer /// is accessed. Buffer const * parent() const { + // if parent_buffer is not loaded, then it has been unloaded, + // which means that parent_buffer is an invalid pointer. So we + // set it to null in that case. if (!theBufferList().isLoaded(parent_buffer)) parent_buffer = 0; return parent_buffer;