#include "InsetMathUnknown.h"
#include "MathAutoCorrect.h"
#include "MathCompletionList.h"
-#include "MathData.h"
#include "MathFactory.h"
#include "InsetMathMacro.h"
#include "InsetMathMacroArgument.h"
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);
}
InsetMathNest::createCompletionList(Cursor const & cur) const
{
if (!cur.inMacroMode())
- return 0;
+ return nullptr;
return new MathCompletionList(cur);
}