fix crash with layout-paste

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5856 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2002-12-18 14:36:28 +00:00
parent fec072f968
commit a58209e735
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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> 2002-12-17 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* lyxfunc.C (getStatus): query lyx_gui::getStatus() to catter for * lyxfunc.C (getStatus): query lyx_gui::getStatus() to catter for

View File

@ -1423,7 +1423,9 @@ void LyXText::copyEnvironmentType()
void LyXText::pasteEnvironmentType(BufferView * bview) void LyXText::pasteEnvironmentType(BufferView * bview)
{ {
setLayout(bview, copylayouttype); // do nothing if there has been no previous copyEnvironmentType()
if (!copylayouttype.empty())
setLayout(bview, copylayouttype);
} }