From 46c5596462005c0a59aa4e8cde5211d8eb282845 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Fri, 3 Apr 2009 16:04:45 +0000 Subject: [PATCH] Add a comment. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29056 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.2