> Attached is a small sample file that causes a segmentation fault in current > cvs. I should read my own coments from time to time... This would not crash as long as we were leaking every inset. But we are not doing so anymore... Patch attached. Andre' -- André Pönitz ............................................. [EMAIL PROTECTED]
Index: array.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/mathed/array.C,v retrieving revision 1.28 diff -u -p -r1.28 array.C --- array.C 2001/07/03 07:56:55 1.28 +++ array.C 2001/07/03 13:42:05 @@ -139,11 +139,10 @@ void MathArray::insert(int pos, byte b, void MathArray::insert(int pos, MathArray const & array) { -#ifdef WITH_WARNINGS -#warning quick and really dirty: make sure that we really own our insets -#endif - MathArray a = array; - bf_.insert(bf_.begin() + pos, a.bf_.begin(), a.bf_.end()); + bf_.insert(bf_.begin() + pos, array.bf_.begin(), array.bf_.end()); + for (int p = pos; p < pos + array.size(); next(p)) + if (isInset(p)) + replace(p, GetInset(p)->clone()); }