diff options
Diffstat (limited to 'Build/source/libs/graphite2/graphite2-src/src/Slot.cpp')
-rw-r--r-- | Build/source/libs/graphite2/graphite2-src/src/Slot.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Build/source/libs/graphite2/graphite2-src/src/Slot.cpp b/Build/source/libs/graphite2/graphite2-src/src/Slot.cpp index 551bec977e5..3330c8131fb 100644 --- a/Build/source/libs/graphite2/graphite2-src/src/Slot.cpp +++ b/Build/source/libs/graphite2/graphite2-src/src/Slot.cpp @@ -197,6 +197,8 @@ int Slot::getAttr(const Segment *seg, attrCode ind, uint8 subindex) const { ind = gr_slatUserDefn; subindex = 0; + if (seg->numAttrs() == 0) + return 0; } else if (ind >= gr_slatJStretch && ind < gr_slatJStretch + 20 && ind != gr_slatJWidth) { @@ -274,6 +276,8 @@ void Slot::setAttr(Segment *seg, attrCode ind, uint8 subindex, int16 value, cons { ind = gr_slatUserDefn; subindex = 0; + if (seg->numAttrs() == 0) + return; } else if (ind >= gr_slatJStretch && ind < gr_slatJStretch + 20 && ind != gr_slatJWidth) { @@ -421,7 +425,7 @@ bool Slot::removeChild(Slot *ap) else if (ap == m_child) { Slot *nSibling = m_child->nextSibling(); - m_child->sibling(NULL); + m_child->removeSibling(nSibling); m_child = nSibling; return true; } @@ -436,7 +440,7 @@ bool Slot::removeSibling(Slot *ap) else if (ap == m_sibling) { m_sibling = m_sibling->nextSibling(); - ap->sibling(NULL); + if (m_sibling) ap->removeSibling(m_sibling); return true; } else |