bool Paragraph::insetAllowed(InsetOld_code code)
{
- return pimpl_->inset_owner->insetAllowed(code);
+ return !pimpl_->inset_owner || pimpl_->inset_owner->insetAllowed(code);
}
bool Paragraph::forceDefaultParagraphs() const
{
- return inInset()->forceDefaultParagraphs(inInset());
+ return inInset() && inInset()->forceDefaultParagraphs(inInset());
}
bool Paragraph::autoBreakRows() const
{
- return static_cast<InsetText *>(inInset())->getAutoBreakRows();
+ return inInset() && static_cast<InsetText *>(inInset())->getAutoBreakRows();
}
// Convert the paragraph to a string.
// Used for building the table of contents
-string const Paragraph::asString(Buffer const & buffer,
- bool label) const
+string const Paragraph::asString(Buffer const & buffer, bool label) const
{
OutputParams runparams;
return asString(buffer, runparams, label);