On 03/09/2010 03:38 AM, Abdelrazak Younes wrote:
On 03/08/2010 08:07 PM, [email protected] wrote:
Author: rgheck
Date: Mon Mar  8 20:07:05 2010
New Revision: 33679
URL: http://www.lyx.org/trac/changeset/33679

Log:
Introduce isBufferValid() method now, that returns true also for cloned
Buffers. Use it, as well.

I don't understand the need for this. I mean, we shouldn't be needing this method. If we need the buffer then the buffer must be set, period. So I would just access buffer() and fixes upward the cases where buffer_ is not properly set.

It's less the check for buffer_ than it is for the Buffer actually being loaded. There are, or at least used to be, cases where a Buffer got unloaded when some other file still had pointers to it. This could happen now, I'd guess, if you opened a new file that included the same child as an existing master. The parent gets reset. The old master still has pointers to that child. Now close the new file and its child. There are probably other ways to get the same effect.

rh

Reply via email to