On Mon, Nov 05, 2007 at 12:17:01AM +0100, Bernhard Roider wrote: > Jürgen Spitzmüller schrieb: >> Andre Poenitz wrote: >>> We definitely should switch to a more user friendly error handling then >>> plain crashs. While it might be annoying that one cannot properly paste >>> form the clipboard we should not crash... >> On Linux, it only crashes with --enable-stdlib-debug. The attached patch >> fixes this particular crash for me, but it's rater a shot in the dark. >> Does it make sense, André? > > what about the attached patch? > > bernhard
> Index: src/mathed/MathParser.cpp > =================================================================== > --- src/mathed/MathParser.cpp (revision 21421) > +++ src/mathed/MathParser.cpp (working copy) > @@ -1018,12 +1018,14 @@ > else if (t.cs() == "\\") { > if (flags & FLAG_ALIGN) > return; > - bool added; > + bool added = false; > if (nextToken().asInput() == "*") { > getToken(); > added = addRow(grid, cellrow, docstring(), > false); > - } else > + } else if (good()) > added = addRow(grid, cellrow, getArg('[', ']')); > + else > + error("missing token after \\\\"); > if (added) { > cellcol = 0; > if (grid.asHullInset()) Does not look wrong. It reminds me that it would be nicve to have a real test suite at least for parser stuff... Andre'