]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.C
partial fix for cut and paste
[lyx.git] / src / paragraph.C
index a1c64793ef329e0c7a6f4b01799eb7fec20450dd..5a7131ab3cc6e8f4553aba5def966d9690410ba7 100644 (file)
@@ -306,7 +306,7 @@ void Paragraph::insertInset(pos_type pos, InsetBase * inset,
 
 bool Paragraph::insetAllowed(InsetOld_code code)
 {
-       return pimpl_->inset_owner->insetAllowed(code);
+       return !pimpl_->inset_owner || pimpl_->inset_owner->insetAllowed(code);
 }
 
 
@@ -715,13 +715,13 @@ InsetBibitem * Paragraph::bibitem() const
 
 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();
 }
 
 
@@ -1570,8 +1570,7 @@ bool Paragraph::isMultiLingual(BufferParams const & bparams) const
 
 // 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);