ref: 67a316e9c9a064a5d93693da08e955bf795757a9
parent: e13fd4acd3bc4c692b09467e7bbd5430811e4570
author: Simon Bünzli <zeniko@gmail.com>
date: Fri Jan 10 17:30:16 EST 2014
follow-up to 8e2f00f15c988d75a4182ecdcdc1a82b4686ef92 This might fix bug 694903.
--- a/jbig2_symbol_dict.c
+++ b/jbig2_symbol_dict.c
@@ -186,6 +186,7 @@
for (index = 0; index < segment->referred_to_segment_count; index++) {
rsegment = jbig2_find_segment(ctx, segment->referred_to_segments[index]);
if (rsegment && ((rsegment->flags & 63) == 0) && rsegment->result &&
+ (((Jbig2SymbolDict *)rsegment->result)->n_symbols > 0) &&
((*((Jbig2SymbolDict *)rsegment->result)->glyphs) != NULL)) {
/* add this referred to symbol dictionary */
dicts[dindex++] = (Jbig2SymbolDict *)rsegment->result;