diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-03-15 09:13:20 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-03-15 09:13:20 +0000 |
commit | 9b92252d80eba01cd25cc9610ad64908af57ba08 (patch) | |
tree | 6b30c240226b3187d7fbf2f098cfc64b8a3fbd7a /Build/source/libs/graphite2/graphite2-src/src/Segment.cpp | |
parent | a47ea6ff25589ac48846a0df205a7a037fe5c5bd (diff) |
graphite2 1.3.7
git-svn-id: svn://tug.org/texlive/trunk@40028 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/graphite2/graphite2-src/src/Segment.cpp')
-rw-r--r-- | Build/source/libs/graphite2/graphite2-src/src/Segment.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Build/source/libs/graphite2/graphite2-src/src/Segment.cpp b/Build/source/libs/graphite2/graphite2-src/src/Segment.cpp index ecc35f50aa0..966f75784dd 100644 --- a/Build/source/libs/graphite2/graphite2-src/src/Segment.cpp +++ b/Build/source/libs/graphite2/graphite2-src/src/Segment.cpp @@ -424,6 +424,9 @@ Position Segment::positionSlots(const Font *font, Slot * iStart, Slot * iEnd, bo if (!iStart) iStart = m_first; if (!iEnd) iEnd = m_last; + if (!iStart || !iEnd) // only true for empty segments + return currpos; + if (isRtl) { for (Slot * s = iEnd, * const end = iStart->prev(); s && s != end; s = s->prev()) @@ -531,6 +534,9 @@ bool Segment::initCollisions() if (!m_collisions) return false; for (Slot *p = m_first; p; p = p->next()) - ::new (collisionInfo(p)) SlotCollision(this, p); + if (p->index() < slotCount()) + ::new (collisionInfo(p)) SlotCollision(this, p); + else + return false; return true; } |