mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix bug #6989: Be somewhat more secure with the homebrew dynamic asserts that were changed in r35855.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35863 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cf9112a3a3
commit
49beed7437
@ -91,8 +91,11 @@ DocIterator DocIterator::clone(Buffer * buffer) const
|
||||
|
||||
bool DocIterator::inRegexped() const
|
||||
{
|
||||
InsetMathHull * i = inset().asInsetMath()->asHullInset();
|
||||
return i && i->getType() == hullRegexp;
|
||||
InsetMath * im = inset().asInsetMath();
|
||||
if (!im)
|
||||
return false;
|
||||
InsetMathHull * hull = im->asHullInset();
|
||||
return hull && hull->getType() == hullRegexp;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1011,10 +1011,13 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
|
||||
case LFUN_REGEXP_MODE: {
|
||||
InsetMathHull * i = cur.inset().asInsetMath()->asHullInset();
|
||||
if (i && i->getType() == hullRegexp) {
|
||||
cur.message(_("Already in regular expression mode"));
|
||||
break;
|
||||
InsetMath * im = cur.inset().asInsetMath();
|
||||
if (im) {
|
||||
InsetMathHull * i = im->asHullInset();
|
||||
if (i && i->getType() == hullRegexp) {
|
||||
cur.message(_("Already in regular expression mode"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
cur.macroModeClose();
|
||||
docstring const save_selection = grabAndEraseSelection(cur);
|
||||
|
@ -164,9 +164,12 @@ bool MathMacro::editMode(BufferView const * bv) const {
|
||||
// look if there is no other macro in edit mode above
|
||||
++i;
|
||||
for (; i != cur.depth(); ++i) {
|
||||
MathMacro const * macro = cur[i].asInsetMath()->asMacro();
|
||||
if (macro && macro->displayMode() == DISPLAY_NORMAL)
|
||||
return false;
|
||||
InsetMath * im = cur[i].asInsetMath();
|
||||
if (im) {
|
||||
MathMacro const * macro = im->asMacro();
|
||||
if (macro && macro->displayMode() == DISPLAY_NORMAL)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ok, none found, I am the highest one
|
||||
|
Loading…
Reference in New Issue
Block a user