two additional fixes, one of them is really suspect...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@524 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2000-02-03 19:08:24 +00:00
parent bae0021420
commit f1f99a0a16
3 changed files with 16 additions and 3 deletions

View File

@ -1,5 +1,11 @@
2000-02-03 Lars Gullik Bjønnes <larsbj@lyx.org> 2000-02-03 Lars Gullik Bjønnes <larsbj@lyx.org>
* src/lyxrow.h: make sure that all Row variables are initialized.
* src/text2.C (TextHandleUndo): comment out a delete, this might
introduce a memory leak, but should also help us to not try to
read freed memory. We need to look at this one.
* src/paragraph.C (SimpleDocBookOneTablePar): initialize column to 0 * src/paragraph.C (SimpleDocBookOneTablePar): initialize column to 0
(LyXParagraph): initalize footnotekind. (LyXParagraph): initalize footnotekind.

View File

@ -17,6 +17,11 @@
/// ///
struct Row { struct Row {
/// ///
Row()
: par(0), pos(0), baseline(0), fill(0), height(0),
ascent_of_text(0), next(0), previous(0)
{}
///
LyXParagraph * par; LyXParagraph * par;
/// ///
LyXParagraph::size_type pos; LyXParagraph::size_type pos;

View File

@ -3427,13 +3427,15 @@ bool LyXText::TextHandleUndo(Undo * undo)
if (undo->kind == Undo::EDIT){ if (undo->kind == Undo::EDIT){
tmppar2->text = tmppar->text; tmppar2->text = tmppar->text;
tmppar->text.clear(); tmppar->text.clear();
//tmppar->text.erase(tmppar->text.begin(),
// tmppar->text.end());
tmppar2 = tmppar2->next; tmppar2 = tmppar2->next;
} }
if ( currentrow && currentrow->par == tmppar ) if ( currentrow && currentrow->par == tmppar )
currentrow = currentrow -> previous; currentrow = currentrow -> previous;
delete tmppar; // Commenting out this might remove the error
// reported by Purify, but it might also
// introduce a memory leak. We need to
// check this (Lgb)
//delete tmppar;
} }
} }