diff --git a/src/insets/InsetFlex.cpp b/src/insets/InsetFlex.cpp index 6d64c3f8ea..cf3741263c 100644 --- a/src/insets/InsetFlex.cpp +++ b/src/insets/InsetFlex.cpp @@ -45,6 +45,9 @@ InsetFlex::InsetFlex(InsetFlex const & in) InsetLayout const & InsetFlex::getLayout() const { + if (!buffer_) + return DocumentClass::plainInsetLayout(); + DocumentClass const & dc = buffer().params().documentClass(); docstring const dname = from_utf8(name_); if (dc.hasInsetLayout(dname))