summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-object.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/pdf/pdf-object.c')
-rw-r--r--source/pdf/pdf-object.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/pdf/pdf-object.c b/source/pdf/pdf-object.c
index 88ed25e5..6fd69bbd 100644
--- a/source/pdf/pdf-object.c
+++ b/source/pdf/pdf-object.c
@@ -1048,8 +1048,9 @@ pdf_dict_put(pdf_obj *obj, pdf_obj *key, pdf_obj *val)
{
if (obj->u.d.items[i].v != val)
{
- pdf_drop_obj(obj->u.d.items[i].v);
+ pdf_obj *d = obj->u.d.items[i].v;
obj->u.d.items[i].v = pdf_keep_obj(val);
+ pdf_drop_obj(d);
}
}
else