A bit late... Angus Leeming wrote:
> Furthermore, there is a leak in the code above. I think the minimal > change is: > > if (from.getInset(i)) { > // the inset is not in a paragraph anymore > tmpinset = from.insetlist.release(i); > + from.insetlist.erase(i); but insetlist.erase actually delete()s the inset so this solution is no good I think. > } > > - if (!to.insetAllowed(tmpinset->lyxCode())) > + if (!to.insetAllowed(tmpinset->lyxCode())) { > + delete tmpinset; > return false; > + } > - to.insertInset(j, tmpinset, tmpfont); > + if (tmpinset) > + to.insertInset(j, tmpinset, tmpfont); > > Ie, I think it was wrong in THREE places! You are right IMO. Alfredo