summaryrefslogtreecommitdiff
path: root/pdf/pdf_object.c
diff options
context:
space:
mode:
authorPaul Gardiner <paulg.artifex@glidos.net>2012-08-08 14:03:34 +0100
committerPaul Gardiner <paulg.artifex@glidos.net>2012-08-08 14:03:34 +0100
commit274ab2d66943bb891976ef712a816e7d128eff22 (patch)
treebee912b4426f3dfe4acc176a57fd5b55db58d53c /pdf/pdf_object.c
parent51661f29a5f229f30ae16e16bd0ef6396cd001af (diff)
parent511ea75a53db6e72334438bcda2ce774c7d72d1e (diff)
downloadmupdf-274ab2d66943bb891976ef712a816e7d128eff22.tar.xz
Merge branch 'master' into forms
Conflicts: Makefile apps/mudraw.c pdf/pdf_write.c win32/libmupdf-v8.vcproj
Diffstat (limited to 'pdf/pdf_object.c')
-rw-r--r--pdf/pdf_object.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/pdf/pdf_object.c b/pdf/pdf_object.c
index 819607ce..fb53d9b8 100644
--- a/pdf/pdf_object.c
+++ b/pdf/pdf_object.c
@@ -512,8 +512,7 @@ pdf_array_put(pdf_obj *obj, int i, pdf_obj *item)
fz_warn(obj->ctx, "assert: index %d > length %d", i, obj->u.a.len);
else
{
- if (obj->u.a.items[i])
- pdf_drop_obj(obj->u.a.items[i]);
+ pdf_drop_obj(obj->u.a.items[i]);
obj->u.a.items[i] = pdf_keep_obj(item);
}
}
@@ -1090,8 +1089,7 @@ pdf_free_array(pdf_obj *obj)
int i;
for (i = 0; i < obj->u.a.len; i++)
- if (obj->u.a.items[i])
- pdf_drop_obj(obj->u.a.items[i]);
+ pdf_drop_obj(obj->u.a.items[i]);
fz_free(obj->ctx, obj->u.a.items);
fz_free(obj->ctx, obj);
@@ -1103,10 +1101,8 @@ pdf_free_dict(pdf_obj *obj)
int i;
for (i = 0; i < obj->u.d.len; i++) {
- if (obj->u.d.items[i].k)
- pdf_drop_obj(obj->u.d.items[i].k);
- if (obj->u.d.items[i].v)
- pdf_drop_obj(obj->u.d.items[i].v);
+ pdf_drop_obj(obj->u.d.items[i].k);
+ pdf_drop_obj(obj->u.d.items[i].v);
}
fz_free(obj->ctx, obj->u.d.items);