summaryrefslogtreecommitdiff
path: root/Build/source/libs/graphite2/graphite2-src/src/Segment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/graphite2/graphite2-src/src/Segment.cpp')
-rw-r--r--Build/source/libs/graphite2/graphite2-src/src/Segment.cpp4
1 files changed, 3 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 3020bfd36d0..f84d28cca8c 100644
--- a/Build/source/libs/graphite2/graphite2-src/src/Segment.cpp
+++ b/Build/source/libs/graphite2/graphite2-src/src/Segment.cpp
@@ -59,7 +59,9 @@ Segment::Segment(unsigned int numchars, const Face* face, uint32 script, int tex
m_dir(textDir),
m_flags(((m_silf->flags() & 0x20) != 0) << 1)
{
- freeSlot(newSlot());
+ Slot *s = newSlot();
+ if (s)
+ freeSlot(s);
m_bufSize = log_binary(numchars)+1;
}