+2002-12-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * text2.C (pasteEnvironmentType): avoid crash if layout-copy has
+ not been invoked
+
2002-12-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lyxfunc.C (getStatus): query lyx_gui::getStatus() to catter for
void LyXText::pasteEnvironmentType(BufferView * bview)
{
- setLayout(bview, copylayouttype);
+ // do nothing if there has been no previous copyEnvironmentType()
+ if (!copylayouttype.empty())
+ setLayout(bview, copylayouttype);
}