[poppler] Branch 'poppler-0.14' - 2 commits - glib/poppler-action.cc glib/poppler-document.cc
Carlos Garcia Campos
carlosgc at kemper.freedesktop.org
Sun Sep 12 02:45:27 PDT 2010
glib/poppler-action.cc | 15 +++++++++------
glib/poppler-document.cc | 1 +
2 files changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 2c7fe5aca584d85f567ce413b9e406e2cc68c7b4
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sun Sep 12 11:42:03 2010 +0200
[glib] Fix a crash when building layer actions
Some layers are just the parent of others, but not actually a layer so
they don't have an optional content object. Fixes bug #30106.
diff --git a/glib/poppler-action.cc b/glib/poppler-action.cc
index ffc1842..048a376 100644
--- a/glib/poppler-action.cc
+++ b/glib/poppler-action.cc
@@ -530,14 +530,17 @@ get_layer_for_ref (PopplerDocument *document,
for (l = layers; l; l = g_list_next (l)) {
Layer *layer = (Layer *)l->data;
- Ref ocgRef = layer->oc->getRef();
- if (ref->num == ocgRef.num && ref->gen == ocgRef.gen) {
- GList *rb_group = NULL;
+ if (layer->oc) {
+ Ref ocgRef = layer->oc->getRef();
- if (preserve_rb)
- rb_group = _poppler_document_get_layer_rbgroup (document, layer);
- return _poppler_layer_new (document, layer, rb_group);
+ if (ref->num == ocgRef.num && ref->gen == ocgRef.gen) {
+ GList *rb_group = NULL;
+
+ if (preserve_rb)
+ rb_group = _poppler_document_get_layer_rbgroup (document, layer);
+ return _poppler_layer_new (document, layer, rb_group);
+ }
}
if (layer->kids) {
commit 615002297707bfd9de2ae663c82b898f3475669c
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date: Sun Sep 12 11:36:58 2010 +0200
[glib] Fix layers array generation when it contains multiple arrays
Fixes layers for document attached to bug #30106.
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index cd6794a..3346cf2 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -1533,6 +1533,7 @@ get_optional_content_items_sorted (OCGs *ocg, Layer *parent, Array *order)
items = g_list_prepend (items, last_item);
}
last_item->kids = get_optional_content_items_sorted (ocg, last_item, orderItem.getArray ());
+ last_item = NULL;
} else if (orderItem.isString ()) {
last_item->label = _poppler_goo_string_to_utf8 (orderItem.getString ());
}
More information about the poppler
mailing list