// We need to update d->macro_ by ourselves because in this case
// MathData::metrics() is not called when selecting a math inset
DocIterator const & pos = d->macroBackup_.pos();
- d->macro_ = pos.buffer()->getMacro(name(), pos);
+ d->macro_ = pos.buffer() ? pos.buffer()->getMacro(name(), pos) : 0;
if (!d->macro_)
d->macro_ = &d->macroBackup_;
}
// We need to update d->macro_ by ourselves because in this case
// MathData::metrics() is not called when selecting a math inset
DocIterator const & pos = d->macroBackup_.pos();
- d->macro_ = pos.buffer()->getMacro(name(), pos);
+ d->macro_ = pos.buffer() ? pos.buffer()->getMacro(name(), pos) : 0;
if (!d->macro_)
d->macro_ = &d->macroBackup_;
}