]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathNest.cpp
Only set buffer if it is not null.
[lyx.git] / src / mathed / InsetMathNest.cpp
index ada0400f18f51045eff592b219a648477c3d8820..97db3cc47686de24e2027ea22952813e170df57e 100644 (file)
@@ -85,7 +85,11 @@ using cap::selClearOrDel;
 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);
 }