summaryrefslogtreecommitdiff
path: root/Build/source/texk/dvipdfmx/src/dpxutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/dvipdfmx/src/dpxutil.c')
-rw-r--r--Build/source/texk/dvipdfmx/src/dpxutil.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfmx/src/dpxutil.c b/Build/source/texk/dvipdfmx/src/dpxutil.c
index a30a3269dfa..e153d050476 100644
--- a/Build/source/texk/dvipdfmx/src/dpxutil.c
+++ b/Build/source/texk/dvipdfmx/src/dpxutil.c
@@ -1,4 +1,4 @@
-/* $Header: /home/cvsroot/dvipdfmx/src/dpxutil.c,v 1.8 2007/11/14 03:36:01 chofchof Exp $
+/* $Header: /home/cvsroot/dvipdfmx/src/dpxutil.c,v 1.9 2008/11/03 22:49:29 matthias Exp $
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
@@ -185,7 +185,7 @@ ht_clear_table (struct ht_table *ht, void (*hval_free_fn) (void *))
hent = ht->table[i];
while (hent) {
- if (hent->value) {
+ if (hent->value && hval_free_fn) {
hval_free_fn(hent->value);
}
hent->value = NULL;
@@ -262,7 +262,9 @@ ht_remove_table (struct ht_table *ht,
RELEASE(hent->key);
hent->key = NULL;
hent->keylen = 0;
- hval_free_fn(hent->value);
+ if (hent->value && hval_free_fn) {
+ hval_free_fn(hent->value);
+ }
hent->value = NULL;
if (prev) {
prev->next = hent->next;
@@ -299,7 +301,8 @@ ht_insert_table (struct ht_table *ht,
hent = hent->next;
}
if (hent) {
- hval_free_fn(hent->value);
+ if (hent->value && hval_free_fn)
+ hval_free_fn(hent->value);
hent->value = value;
} else {
hent = NEW(1, struct ht_entry);