Yuriy found these specific problems. They do not cause a crash, but
they are not good.
InsetMathMacro::InsetMathMacro(InsetMathMacro const & that)
: InsetMathNest(that), d(new Private(*that.d))
{
- setBuffer(*that.buffer_);
+ // FIXME This should not really be necessary, but when we are
+ // initializing the table of global macros, we create macros
+ // with no associated Buffer.
+ if (that.buffer_)
+ setBuffer(*that.buffer_);
d->updateChildren(this);
}
InsetMathNest::InsetMathNest(Buffer * buf, idx_type nargs)
: InsetMath(buf), cells_(nargs), lock_(false)
{
- setBuffer(*buf);
+ // FIXME This should not really be necessary, but when we are
+ // initializing the table of global macros, we create macros
+ // with no associated Buffer.
+ if (buf)
+ setBuffer(*buf);
}