diff options
Diffstat (limited to 'starmath/source/cursor.cxx')
-rw-r--r-- | starmath/source/cursor.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx index 3baf5e1b9f78..dab3dc497974 100644 --- a/starmath/source/cursor.cxx +++ b/starmath/source/cursor.cxx @@ -139,11 +139,14 @@ void SmCursor::BuildGraph(){ } //Set position and anchor to first caret position auto it = mpGraph->begin(); + assert(it != mpGraph->end()); if(!mpPosition) - mpPosition = (it == mpGraph->end()) ? nullptr : it->get(); + mpPosition = it->get(); if(!mpAnchor) mpAnchor = mpPosition; + assert(mpPosition); + assert(mpAnchor); OSL_ENSURE(mpPosition->CaretPos.IsValid(), "Position must be valid"); OSL_ENSURE(mpAnchor->CaretPos.IsValid(), "Anchor must be valid"); } |