summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f15cbe6)
There is a case where mGlyphPositions is cleared in Controller::Relayouter::Relayout.
At this time, if try to partially erase mGlyphPositions in ClearGlyphModelData, Assert occurs.
Because the count of mGlyphPositions is already 0.
This patch prevents this issue though a count check.
Change-Id: I00c919c75acd1d389877c55acfcd75878b28bc91
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
mModel->mVisualModel->mCharactersPerGlyph.Erase(charactersPerGlyphBuffer + mTextUpdateInfo.mStartGlyphIndex,
charactersPerGlyphBuffer + endGlyphIndexPlusOne);
mModel->mVisualModel->mCharactersPerGlyph.Erase(charactersPerGlyphBuffer + mTextUpdateInfo.mStartGlyphIndex,
charactersPerGlyphBuffer + endGlyphIndexPlusOne);
- // Clear the positions buffer.
- Vector2* positionsBuffer = mModel->mVisualModel->mGlyphPositions.Begin();
- mModel->mVisualModel->mGlyphPositions.Erase(positionsBuffer + mTextUpdateInfo.mStartGlyphIndex,
- positionsBuffer + endGlyphIndexPlusOne);
+ // Should pass if mGlyphPositions has already been cleared in Controller::Relayouter::Relayout
+ if(0u != mModel->mVisualModel->mGlyphPositions.Count())
+ {
+ // Clear the positions buffer.
+ Vector2* positionsBuffer = mModel->mVisualModel->mGlyphPositions.Begin();
+ mModel->mVisualModel->mGlyphPositions.Erase(positionsBuffer + mTextUpdateInfo.mStartGlyphIndex,
+ positionsBuffer + endGlyphIndexPlusOne);
+ }
}
if(NO_OPERATION != (LAYOUT & operations))
}
if(NO_OPERATION != (LAYOUT & operations))