poppler/Annot.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
New commits: commit 132ef18324f62c1f2a08dcd794b379fadaa4daf5 Author: Petr Gajdos <pgaj...@suse.cz> Date: Wed Feb 11 19:37:21 2015 +0100 Annot BG/BC: Empty Array means no color diff --git a/poppler/Annot.cc b/poppler/Annot.cc index d35cb9b..d7769a0 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -32,6 +32,7 @@ // Copyright (C) 2014 Marek Kasik <mka...@redhat.com> // Copyright (C) 2014 Jiri Slaby <jirisl...@gmail.com> // Copyright (C) 2014 Anuj Khare <khareanu...@gmail.com> +// Copyright (C) 2015 Petr Gajdos <pgaj...@suse.cz> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -1045,14 +1046,24 @@ AnnotAppearanceCharacs::AnnotAppearanceCharacs(Dict *dict) { obj1.free(); if (dict->lookup("BC", &obj1)->isArray()) { - borderColor = new AnnotColor(obj1.getArray()); + Array *colorComponents = obj1.getArray(); + if (colorComponents->getLength() > 0) { + borderColor = new AnnotColor(colorComponents); + } else { + borderColor = NULL; + } } else { borderColor = NULL; } obj1.free(); if (dict->lookup("BG", &obj1)->isArray()) { - backColor = new AnnotColor(obj1.getArray()); + Array *colorComponents = obj1.getArray(); + if (colorComponents->getLength() > 0) { + backColor = new AnnotColor(colorComponents); + } else { + backColor = NULL; + } } else { backColor = NULL; } _______________________________________________ poppler mailing list poppler@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/poppler