Author: rgheck Date: Thu May 12 15:32:19 2011 New Revision: 38721 URL: http://www.lyx.org/trac/changeset/38721
Log: Make sure we do not crash here in release mode. Modified: lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathFrac.cpp lyx-devel/branches/BRANCH_2_0_X/status.20x Modified: lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathFrac.cpp ============================================================================== --- lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathFrac.cpp Thu May 12 15:28:23 2011 (r38720) +++ lyx-devel/branches/BRANCH_2_0_X/src/mathed/InsetMathFrac.cpp Thu May 12 15:32:19 2011 (r38721) @@ -22,6 +22,7 @@ #include "MetricsInfo.h" #include "TextPainter.h" +#include "support/lassert.h" #include "frontends/Painter.h" using namespace std; @@ -366,23 +367,32 @@ } -// FIXME This will crash on unitone and is wrong in other cases. void InsetMathFrac::maple(MapleStream & os) const { + if (nargs() != 2) { + // Someone who knows about maple should fix this. + LASSERT(false, return); + } os << '(' << cell(0) << ")/(" << cell(1) << ')'; } -// FIXME This will crash on unitone and is wrong in other cases. void InsetMathFrac::mathematica(MathematicaStream & os) const { + if (nargs() != 2) { + // Someone who knows about mathematica should fix this. + LASSERT(false, return); + } os << '(' << cell(0) << ")/(" << cell(1) << ')'; } -// FIXME This will crash on unitone and is wrong in other cases. void InsetMathFrac::octave(OctaveStream & os) const { + if (nargs() != 2) { + // Someone who knows about octave should fix this. + LASSERT(false, return); + } os << '(' << cell(0) << ")/(" << cell(1) << ')'; } Modified: lyx-devel/branches/BRANCH_2_0_X/status.20x ============================================================================== --- lyx-devel/branches/BRANCH_2_0_X/status.20x Thu May 12 15:28:23 2011 (r38720) +++ lyx-devel/branches/BRANCH_2_0_X/status.20x Thu May 12 15:32:19 2011 (r38721) @@ -28,6 +28,8 @@ except on Windows, where 30 minutes are allowed. This is because the Windows installer may trigger MiKTeX updates that suffer from network latencies. +- Improved XHTML output of various fractions. + * USER INTERFACE @@ -52,9 +54,8 @@ * DOCUMENT INPUT/OUTPUT -- Fixed crash when outputing the unitone command to XHTML. - -- Improved XHTML output of various fractions. +- Fixed crash when outputing the unitone command to XHTML or when using + such commands with mathematica, octave, or maple. - Fix output of decimally aligned columns in unviewed (on screen) tables. @@ -74,6 +75,7 @@ a document containing aligned and other multi-cell environments (bug ##7549). + * USER INTERFACE - Fix crash relating to outliner and mouse movement.