]> git.lyx.org Git - features.git/blobdiff - src/DocIterator.cpp
Fix bug #6989: Be somewhat more secure with the homebrew dynamic asserts that were...
[features.git] / src / DocIterator.cpp
index 2c244ae2e11c224f20429b8eb764927084eeb404..3af7dcba93b96762e5055b8a8c6479ae89cdb38b 100644 (file)
@@ -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;
 }