From 48146e5612f6d272d6962f6829c6d64a31edef89 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 10 May 2010 20:07:56 -0400 Subject: [PATCH] Don't fail sanitize on NULL data --- src/hb-open-type-private.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 3f05bf7..c7b087e 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -290,6 +290,11 @@ struct Sanitizer context->init (blob); + if (unlikely (!context->start)) { + context->finish (); + return blob; + } + Type *t = CastP (const_cast (context->start)); sane = t->sanitize (context); -- 2.7.4